Categories

Oct 7 in Ansible
Q:

How to test Ansible projects?

1 Answer

Oct 7

Below three methods are available to test Ansible projects:

1) Asserts: Asserts matches how the test works in other languages such as Python. It verifies the system has reached the actual position where the test executes, not as a simulation, which you find in check mode. Asserts displays that the task did what it actually had to do.

2) Check Mode: The check mode in Ansible allows users to run the playbook without touching anything else. This implies that it will let the user know what the modules would have changed if the playbook was executed without check mode. Check mode is like a simulation only and is the least used option in Ansible.

3) Manual Run: It verifies that the system is in the state you would wish for. It is an easy method, but risky because the results might not be as same as in the production environment.

Click here to read more about Ansible
Click here to read more about Insurance

Related questions

Madanswer
May 8 in Ansible
Nov 13, 2019 in Ansible
May 8 in Ansible
...