ansible-role-nginx/molecule/default/verify.yml
2021-06-02 17:47:44 +02:00

26 lines
596 B
YAML

---
- name: Verify
hosts: all
tasks:
- name: Check if NGINX is installed
package:
name: nginx
state: present
check_mode: true
register: install
failed_when: (install is changed) or (install is failed)
- name: Check if NGINX service is running
service:
name: nginx
state: started
enabled: true
check_mode: true
register: service
failed_when: (service is changed) or (service is failed)
- name: Verify NGINX is up and running
uri:
url: http://localhost
status_code: 200