Identifier for host managed by ansible

14 views
Skip to first unread message

Simon Gao

unread,
Oct 7, 2021, 4:17:22 PM10/7/21
to Ansible Project
Hi,

Is there known or common way to add an identifier on the hosts managed by ansible?

Like indentifying os distribution in /etc/redhat-release or /etc/os-release etc, we would like to add some identifying mark on the hosts managed by ansible.

For SaltStack, we can easily tell by checking salt configuration or salt-minion process.  How do people identify the hosts managed via ansible?

Simon

John Dough

unread,
Oct 10, 2021, 8:19:37 AM10/10/21
to Ansible Project
For a lot of host level information, there is ansible_facts: https://docs.ansible.com/ansible/latest/user_guide/playbooks_vars_facts.html

For ad hoc variables which you want to define you can inventory vars at various levels

Reply all
Reply to author
Forward
0 new messages