in Ansible by
Q:

How to test Ansible projects?

► Click here to show 1 Answer

0 votes
by

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.

Ansible
Learn More with Madanswer

Related questions

+1 vote
asked May 8, 2020 in Ansible by SakshiSharma
...