From 717ecac1b862a5fbbdbb0958d7c0987a0764a9b6 Mon Sep 17 00:00:00 2001 From: Brian Sidebotham Date: Thu, 30 Aug 2018 11:46:40 +0100 Subject: [PATCH 1/2] Add option to enable service fixes #42 --- nginx/server.sls | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nginx/server.sls b/nginx/server.sls index 4cfd577..7f4bb84 100644 --- a/nginx/server.sls +++ b/nginx/server.sls @@ -77,6 +77,9 @@ nginx_service: - name: {{ server.service }} - require: - pkg: nginx_packages +{%- if server.service_enable is defined and server.service_enable %} + - enable: true +{%- endif %} {%- set generate_dhparams = { 'enabled': False } %} {%- for site_name, site in server.get('site', {}).iteritems() %} From 24a8677b325cbefb48b483405b7c01276fc65cf4 Mon Sep 17 00:00:00 2001 From: Brian Sidebotham Date: Mon, 3 Sep 2018 11:02:50 +0100 Subject: [PATCH 2/2] Allow better control of service enabling --- nginx/server.sls | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nginx/server.sls b/nginx/server.sls index 40cea0c..763e928 100644 --- a/nginx/server.sls +++ b/nginx/server.sls @@ -106,8 +106,8 @@ nginx_service: - name: {{ server.service }} - require: - pkg: nginx_packages -{%- if server.service_enable is defined and server.service_enable %} - - enable: true +{%- if server.service_enable is defined %} + - enable: {{ server.service_enable }} {%- endif %} {%- set generate_dhparams = { 'enabled': False } %}