Created
August 27, 2022 20:36
-
-
Save danielnegreiros/79f2f49c46656d5a341181677e9610b9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# This is an example playbook to execute Ansible tests. | |
- name: Verify | |
hosts: all | |
gather_facts: false | |
tasks: | |
- name: Get info from Nginx running process | |
ansible.builtin.command: systemctl status nginx | |
register: nginx_status | |
- name: Assert that Nginx is up and running | |
ansible.builtin.assert: | |
that: | |
- nginx_status is success | |
success_msg: Nginx successfully installed and started | |
fail_msg: The test validation failed, please check manually |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment