Ansible: Could Not Match Supplied Host Pattern

Red Hat Ansible Red Hat Ansible

Quite often you’re clear on what your Ansible playbook should be doing and perhaps even know the syntax is correct, but there are still concerns about the implications. In such cases it’s best to run your Ansible playbook in dry run mode: preview changes without actually making them.

How To Preview Ansible Playbook Run

Simply add the –check parameter to the end of your ansible-playbook command:

$ ansible-playbook try.yaml --check

This will show you exactly the changes the playbook would have made, but without actually making them.

Ansible would even go as far as computing the necessary changes as if you made them, lining up variable values etc. It would also show you what will get changed as if it’s already changed – but without any risks.

That’s it for today, this is a very short note but I’ll come back and revisit it soon to provide examples.

See Also




Contact Me

Follow me on Facebook, Twitter or Telegram:
Recommended
I learn with Educative: Educative
IT Consultancy
I'm a principal consultant with Tech Stack Solutions. I help with cloud architectrure, AWS deployments and automated management of Unix/Linux infrastructure. Get in touch!
Recent Articles
03 Sep 2024

macOS Sequoia 15.0

02 Sep 2024

Video: Has This Worked Before?

24 Mar 2024

Homelab: Mac Pro 2013 32GB

Recent Tweets