So I’ve got a playbook I’ve written where the config is different depending on the network it resides on.
How can I determine this and be able to save the network as a variable?
So I’ve got a playbook I’ve written where the config is different depending on the network it resides on.
How can I determine this and be able to save the network as a variable?
Did you get any chance to through setup module?
https://docs.ansible.com/ansible/latest/modules/setup_module.html
/usr/bin/ansible
to check what variables are available to a host. Ansible provides many facts about the system, automatically.