From the course: Ansible Essential Training

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Testing plays with check mode

Testing plays with check mode - Ansible Tutorial

From the course: Ansible Essential Training

Testing plays with check mode

- [Instructor] How do most of us go about testing our Ansible implementations? Well, oftentimes we find ourselves testing things against actual equipment. That's not all that ideal. I mean, we know that Ansible is remarkably quote unquote, safe in its operation, right? With something like item potents. If we run a script, not a script, if we read a playbook again and again and again, against target systems, we don't cause damage. So it can get really comfortable with you doing your testing of your Ansible implementation against actual gear. But I've got great news for you, you don't have to do that. No, you can take advantage of the great check feature. And I must tell you that when I first discovered this feature, I was doing cartwheels, I was so excited. This makes so much sense. Let's take something that we did earlier, and that was our use_templates.yml file. This playbook made full advantage of the jinja2…

Contents