#### Playbook useful switches: ``` ansible-playbook -C -D -i [-u ] [-t tag1,tag2] [--list-hosts] [-l host1,host2] play.yml -C check_mode -D show file diffs ``` #### Ad-hoc commands: ``` ansible -i -a EXAMPLE: ansible -i inventory/beta tag_Role_api_socket -a "date" ``` #### Gather facts from a host: ```ansible -m setup -i ``` #### Search for pattern in all encrypted vault files: ```for f in $(grep -rl '$ANSIBLE_VAULT;1.1'); do echo $f:; ansible-vault view $f | grep ; done```