V
V
Venot2020-07-01 19:42:57
System administration
Venot, 2020-07-01 19:42:57

How to pass a parameter to Ansible?

i don't have access to ansible.cfg but i want to pass a parameter when calling the playbook, can this be done?
stdout_callback = myplag I want to connect my plugin, is there a way?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitry, 2020-07-01
@q2digger

if you don't have access to the system /etc/ansible/ansible.cfg , you can use your own /home/user/.ansible.cfg , plus a couple more options, including an environment variable pointing to any custom file.
https://docs.ansible.com/ansible/latest/reference_...

S
Sergey, 2020-07-01
@BocmanPY

Strange case, isn't that what you're talking about?

-M, --module-path
prepend colon-separated path(s) to module library (default=~/.ansible/plugins/modules:/usr/share/ansible/plugins/modules)

P
Puma Thailand, 2020-07-02
@opium

You can put the plugin in the recipe and use it however you want.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question