Ansible – Dryrun and Limit Hosts

Here are a couple of useful Ansible playbook CLI switches I tend to use frequently.

Dry-run mode – Add this switch if you want to see what Ansible will do, without actually doing it.

  • –check

Limit target hosts – Add this switch to specify what host(s) you want to run the playbook against.

  • –limit
  • –limit “host1, host2, host3”
  • –limit “myGroup”

Ansible_Linux_www.hackthesec.co_.in_