ansible-role-nginx/molecule/source/verify.yml

18 lines
419 B
YAML

---
- name: Verify
hosts: all
tasks:
- name: Check if NGINX service is running
ansible.builtin.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
ansible.builtin.uri:
url: http://localhost
status_code: 200