Editing /etc/ansible/hosts
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | <code>[[/etc/ansible/]][[hosts]]</code><ref>http://docs.ansible.com/ansible/latest/intro_inventory.html</ref>, text configuration file for managed nodes, or ''[[inventory]]'' in Ansible terminology, in [[INI]] or [[YAML]] format. | + | * <code>[[/etc/ansible/]][[hosts]]</code><ref>http://docs.ansible.com/ansible/latest/intro_inventory.html</ref>, text configuration file for managed nodes, or ''[[inventory]]'' in Ansible terminology, in [[INI]] or [[YAML]] format. |
− | |||
− | == | + | == Example == |
Defining specific user for some group of hosts: | Defining specific user for some group of hosts: | ||
[my_new_group] | [my_new_group] | ||
Line 13: | Line 12: | ||
[my_new_group:vars] | [my_new_group:vars] | ||
[[ansible_user]]=sysadm | [[ansible_user]]=sysadm | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Activities == | == Activities == | ||
Line 77: | Line 70: | ||
* <code>[[ansible HOSTNAME -m ping]]</code> | * <code>[[ansible HOSTNAME -m ping]]</code> | ||
* <code>[[ansible -m ping]]</code> | * <code>[[ansible -m ping]]</code> | ||
− | + | ||
− | + | [[skipping: no hosts matched]] | |
== See also == | == See also == |
Advertising: