List tasks and hosts without running
Preview the run: every task and the final target hosts, without connecting to them
ansible-playbook site.yml --list-tasks --list-hosts -i prod
- tool
- ansible56 commands
More ansible commands
-
ANSIBLE_CALLBACKS_ENABLED=profile_tasks ansible-playbook site.ymlSort tasks by run time to find the slow steps; profile_roles does the same per role
-
ANSIBLE_KEEP_REMOTE_FILES=1 ansible-playbook site.yml -vvvv --limit <host>Keep the module scripts Ansible pushed to ~/.ansible/tmp, so you can debug a failing module by hand
-
ansible-playbook -i inventory/prod playbook.yml --diffRun a playbook with --diff to see what it changes
-
ansible-playbook -i inventory playbook.yml --limit host1,host2Run only on the listed hosts from the inventory
-
ansible-playbook -i inventory playbook.yml --tags install,configureRun only the tasks with these tags