Define nginx config before package installation to avoid port conflict
authorJan Dittberner <jandd@cacert.org>
Sat, 26 Aug 2017 20:41:25 +0000 (22:41 +0200)
committerJan Dittberner <jandd@cacert.org>
Sat, 26 Aug 2017 20:41:25 +0000 (22:41 +0200)
sitemodules/profiles/manifests/sniproxy.pp

index 4a19ebd..1453c3f 100644 (file)
@@ -77,18 +77,24 @@ class profiles::sniproxy (
     subscribe => [File['/etc/default/sniproxy'], File['/etc/sniproxy.conf']],
   }
 
-  package { 'nginx-light':
-    ensure  => present,
+  file { '/etc/nginx':
+    ensure => directory,
+    owner  => 'root',
+    group  => 'root',
+    mode   => '0755',
   } ->
   file { '/etc/nginx/nginx.conf':
-    ensure  => file,
-    owner   => 'root',
-    group   => 'root',
-    mode    => '0644',
-    source  => 'puppet:///modules/profiles/sniproxy/nginx.conf',
+    ensure => file,
+    owner  => 'root',
+    group  => 'root',
+    mode   => '0644',
+    source => 'puppet:///modules/profiles/sniproxy/nginx.conf',
+  } ->
+  package { 'nginx-light':
+    ensure => present,
   } ->
   service { 'nginx':
-    ensure  => running,
-    enable  => true,
+    ensure => running,
+    enable => true,
   }
 }