Ansible Cheatsheet
Ping machine
Password prompt with apk-pass
Note that this is not safe, usually better to use SSH Keys
Playbook run:
playbooks are used to automate tasks
To run playbook:
--ask-become-pass asks to become super user
To run playbook and become super user:
To run playbook with specific key use args: --key-file
To run playbook for ssh autorized_keys:
To check playbook syntax use:
To check the playbook tags use:
ansible-playbook <path-to-playbook/playbook.yml> --list-tags
To execute playbook with tags use:
To execute multiple tags:
To execute playbook for specific groups, you have to provide the hosts file like so:
The playbook must include the group required to run this:
To roll out specific hosts file with specific user and user password run:
Last updated