Editing Ansible
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 21: | Line 21: | ||
== Configuration files == | == Configuration files == | ||
There are at least two configuration files in Ansible: | There are at least two configuration files in Ansible: | ||
− | * <code> | + | * <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/ansible.cfg]]</code><ref>https://docs.ansible.com/ansible/latest/installation_guide/intro_configuration.html</ref><ref>https://docs.ansible.com/ansible/latest/reference_appendices/config.html#ansible-configuration-settings</ref> general configuration file. | * <code>/[[etc/ansible/ansible.cfg]]</code><ref>https://docs.ansible.com/ansible/latest/installation_guide/intro_configuration.html</ref><ref>https://docs.ansible.com/ansible/latest/reference_appendices/config.html#ansible-configuration-settings</ref> general configuration file. | ||
Line 44: | Line 44: | ||
:: <code>ansible MACHINE_NAME -m shell -a COMMAND</code> | :: <code>ansible MACHINE_NAME -m shell -a COMMAND</code> | ||
− | * List available | + | * List available modules: |
− | :: <code> | + | :: <code>ansible-doc -l</code> |
* Execute a user defined task definition or playbook: | * Execute a user defined task definition or playbook: | ||
Line 75: | Line 75: | ||
- user: | - user: | ||
name: USERNAME | name: USERNAME | ||
− | + | shell: /bin/bash | |
groups: sudo | groups: sudo | ||
append: yes | append: yes | ||
Line 121: | Line 121: | ||
* <code>[[ansible --help]]</code> | * <code>[[ansible --help]]</code> | ||
* [[Ansible lookup plugins]] | * [[Ansible lookup plugins]] | ||
− | |||
− | |||
== See also == | == See also == |
Advertising: