G
G
gremlintv22019-01-17 15:00:40
Ansible
gremlintv2, 2019-01-17 15:00:40

ANSIBLE How to pass host variable via ad-hoc and via playbook?

Hello, I googled, but unfortunately I didn’t find it (maybe I was looking, not what I needed):
In general, you need to run the following command on the host:

ip link set {{ ansible_default_ipv4.interface }} txqueuelen 10000

ansible test-server -m command -a "ip link set {{ ansible_default_ipv4.interface }} txqueuelen 10000"

does not work
Tell me how to execute this command in ad-hoc and playbook.
Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Puma Thailand, 2019-01-17
@opium

Make it in playbook

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question