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

26 lines
664 B
YAML
Raw Normal View History

2020-09-09 16:10:42 +02:00
---
- name: Verify
hosts: all
tasks:
- name: Check if NGINX Plus is installed
ansible.builtin.package:
name: nginx-plus
state: present
check_mode: true
register: install
failed_when: (install is changed) or (install is failed)
- name: Check if NGINX Plus service is running
ansible.builtin.service:
2020-09-09 16:10:42 +02:00
name: nginx
state: started
enabled: true
check_mode: true
2020-09-09 16:10:42 +02:00
register: service
failed_when: (service is changed) or (service is failed)
- name: Verify NGINX Plus is up and running
ansible.builtin.uri:
2020-09-09 16:10:42 +02:00
url: http://localhost
status_code: 200