diff --git a/defaults/main.yml b/defaults/main.yml index 3a075c0..48064a2 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -40,3 +40,5 @@ nginx_upstreams: [] # "srv2.example.com weight=3", # "srv3.example.com" # } + +nginx_enable_restart: true diff --git a/tasks/main.yml b/tasks/main.yml index d63dbac..e561733 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -27,5 +27,6 @@ - name: Ensure nginx is started and enabled to start at boot. service: name=nginx state=started enabled=yes + when: nginx_enable_restart - include: vhosts.yml