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

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

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