ansible-role-nginx/molecule/common/playbooks/plus_verify.yml

25 lines
575 B
YAML
Raw Normal View History

2020-09-09 16:10:42 +02:00
---
- name: Verify
hosts: all
tasks:
- name: Check if NGINX is installed
package:
name: nginx-plus
check_mode: yes
register: install
failed_when: (install is changed) or (install is failed)
2020-09-09 16:10:42 +02:00
- name: Check if NGINX service is running
service:
name: nginx
state: started
enabled: yes
check_mode: yes
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