Loading tool…
cheatsheet
ansible all -m pingPing all hosts in inventory
ansible webservers -a 'df -h'Check disk space on webservers
ansible dbservers -m apt -a 'name=nginx state=present'Install Nginx on DB servers (Debian/Ubuntu)
ansible-inventory --list -yDisplay compiled inventory
ansible-playbook playbook.ymlRun an Ansible playbook
ansible-playbook playbook.yml --checkRun playbook in check mode (dry run)
ansible-playbook playbook.yml --syntax-checkCheck playbook syntax
ansible-playbook playbook.yml --diffShow changes made by playbook
ansible-playbook playbook.yml -l webserversRun playbook only on webservers group
ansible-playbook playbook.yml --start-at-task 'Install Nginx'Start playbook execution from a specific task
ansible-vault create secret.ymlCreate an encrypted YAML file
ansible-vault edit secret.ymlEdit an encrypted file
ansible-vault view secret.ymlView an encrypted file
ansible-vault encrypt file.txtEncrypt an existing file
ansible-vault decrypt file.txtDecrypt an encrypted file
ansible-vault rekey secret.ymlChange the vault password
ansible-galaxy init my_roleCreate a new role skeleton
ansible-galaxy collection init my_namespace.my_collectionCreate a new collection skeleton
ansible-galaxy install community.generalInstall a collection from Ansible Galaxy
Get new cheatsheets & tools in your inbox
No spam — just new releases, occasionally.