0 votes
in Ansible by

How to test Ansible projects?

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.

Related questions

+1 vote
asked May 8, 2020 in Ansible by SakshiSharma
0 votes
asked Nov 13, 2019 in Ansible by rajeshsharma
...