This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
ansible:ansible_cmd [2023/08/29 22:10] manu |
ansible:ansible_cmd [2024/04/19 12:26] (current) manu [All ansible commands] |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Ansible command examples ====== | ====== Ansible command examples ====== | ||
| + | |||
| + | ===== All ansible commands ===== | ||
| + | |||
| + | https://docs.ansible.com/ansible/latest/command_guide/command_line_tools.html | ||
| + | |||
| + | **ansible-rulebook** : start a playbook based on a specific event | ||
| + | https://blog.stephane-robert.info/post/ansible-event-driven/ | ||
| + | |||
| + | **ansible-pull** : opposite to ansible is based on the push mode, offering a central management, the pull mode can be use in specific cases | ||
| + | https://blog.octo.com/ansible-pull-killer-feature | ||
| + | | ||
| + | **ansible-galaxy** : get collections of playbooks | ||
| + | |||
| + | **ansible** : Define and run a single task ‘playbook’ against a set of hosts | ||
| + | |||
| + | **ansible-playbook** : Define and run a single task ‘playbook’ against a set of hosts | ||
| + | |||
| + | **ansible-config** : View ansible configuration | ||
| + | |||
| + | **ansible-console** : REPL console for executing Ansible tasks | ||
| + | |||
| + | **ansible-doc** : plugin documentation tool | ||
| + | |||
| + | **ansible-galaxy** : Perform various Role and Collection related operations | ||
| + | |||
| + | **ansible-inventory** : Show Ansible inventory information, by default it uses the inventory script JSON format | ||
| + | |||
| + | **ansible-vault** : encryption/decryption utility for Ansible data files | ||
| + | |||
| + | **ansible-lint** : check playbook syntax | ||
| ===== cmd ===== | ===== cmd ===== | ||
| Line 51: | Line 81: | ||
| <cli prompt='$'> | <cli prompt='$'> | ||
| - | $ ANSIBLE_REMOTE_USER=tux ansible all -k -K -m ping | + | $ ANSIBLE_REMOTE_USER=user01 ansible all -k -K -m ping |
| SSH password: | SSH password: | ||
| BECOME password[defaults to SSH password]: | BECOME password[defaults to SSH password]: | ||
| Line 394: | Line 424: | ||
| when: results.changed == true | when: results.changed == true | ||
| </cli> | </cli> | ||
| + | |||
| + | |||