Disable nginx autostart after packege install

Change-Id: I986d3ff0044ced2b5f052336e115fb3f7d3132cc
diff --git a/nginx/server.sls b/nginx/server.sls
index 4cfd577..7faf725 100644
--- a/nginx/server.sls
+++ b/nginx/server.sls
@@ -5,6 +5,19 @@
   - nginx.server.users
   - nginx.server.sites
 
+{#- Do not start nginx when installing packages #}
+{%- if grains.os_family == "Debian" %}
+policy-rc.d_present:
+  file.managed:
+  - name: /usr/sbin/policy-rc.d
+  - mode: 755
+  - contents: |
+      #!/bin/sh
+      exit 101
+  - require_in:
+    - nginx_packages
+{%- endif %}
+
 nginx_packages:
   pkg.installed:
   - names: {{ server.pkgs }}
@@ -13,6 +26,17 @@
 nginx_extra_packages:
   pkg.installed:
   - name: nginx-extras
+  - require:
+    - nginx_packages
+{%- endif %}
+
+{#- Do not start nginx when installing packages #}
+{%- if grains.os_family == "Debian" %}
+policy-rc.d_absent:
+  file.absent:
+  - name: /usr/sbin/policy-rc.d
+  - require:
+    - nginx_packages
 {%- endif %}
 
 /etc/nginx/sites-enabled/default: