Browse Source

PR #156 follow-up: Make service state more configurable.

pull/156/head
Jeff Geerling 3 years ago
parent
commit
630cf44e8d
  1. 12
      tasks/main.yml

12
tasks/main.yml

@ -41,10 +41,8 @@
notify:
- reload nginx
- name: Configure current state of nginx service.
service: name=nginx state={{ nginx_service_state }}
when: ((nginx_service_state is defined) and (nginx_service_state != None))
- name: Configure nginx boot enablement.
service: name=nginx enabled={{ nginx_service_enabled }}
when: ((nginx_service_enabled is defined) and (nginx_service_enabled != None))
- name: Ensure nginx service is running as configured.
service:
name: nginx
state: "{{ nginx_service_state }}"
enabled: "{{ nginx_service_enabled }}"