These are commonly used Ansible-Playbook Optional Arguments
| Flag | Description |
| -i, –inventory | Specify inventory host path or comma-seperated host list |
| -b, –become | Run operations with become (not imply password prompting). Uses existing privilege escalation like sudo, dzdo, runas etc |
| -K –ask-become-pass | Ask for the privilege escalation password |
| –become-method <become-method> | Privilege escalation method to use. Default is sudo. |
| –become-password-file <BECOME_PASSWORD_FILE> | Privilege escalation password file |
| –become-user <BECOME_USER> | Run the operation as this user. Default is root |
| -f <FORKS>, –f | Specify the number of parallel processes to use. Default is 5 |
| -e, –extra-vars | Additional variables as key=value. When specifying a filecontaining a set of variables, prepend the file with @ |
| -t <Tags> –tags <TAGS> | Only run plays and tasks tagged with these values |
| –ask-vault-password, –ask-vault-pass | Ask foir vault password |
References:
- Red Hat Certified Engineer (RHCE) Ansible Automation Study Guide (Alexc Soto Bueno)