]> WPIA git - infra.git/commitdiff
upd: cleanup file-dependencies for lxcs
authorFelix Dörre <felix@dogcraft.de>
Fri, 16 Jun 2017 21:36:10 +0000 (23:36 +0200)
committerLucas Werkmeister <mail@lucaswerkmeister.de>
Mon, 16 Oct 2017 18:01:25 +0000 (20:01 +0200)
lxc containers with bind mounts require the file resources of the source
paths of those bind mounts. Declare this in the lxc module, instead of
declaring those requirements individually in the module definitions.

Change-Id: If8beec5f772e3ce316a6f9d6b47484d891e4cfa1

environments/production/manifests/root.pp
modules/lxc/manifests/init.pp

index db84e8d9653c8b7d3e0d6f55623fe2ede60ce051..e0411584bf14701b408088e95e8a60134408fc39 100644 (file)
@@ -110,7 +110,7 @@ if $signerLocation == 'self' {
           "/run/git-smart-http-socket" => {target => 'git-smart-http-socket'},
           "/data/git" => { 'target' => "srv/git", option => ",ro"}
         },
-        require => File['/data/nginx', '/data/crl/htdocs', '/data/gigi-crl']
+        require => File['/data/crl/htdocs']
     }
     file { '/data':
        ensure => 'directory',
@@ -154,7 +154,6 @@ if $signerLocation == 'self' {
           "/data/postgres/data" => { target => "var/lib/postgresql"},
           "/data/postgres/conf" => { target => "etc/postgresql"}
         },
-        require => File['/data/postgres']
     }
     $gigi_serial_conf= $signerLocation ? {
       'self'          => [],
@@ -170,7 +169,6 @@ if $signerLocation == 'self' {
           "/data/gigi-crl" => { target => "var/lib/cassiopeia/ca"}
         },
         confline => $gigi_serial_conf,
-        require => File['/data/gigi', '/data/gigi-crl']
     }
     if $signerLocation == 'self' {
       lxc::container { 'cassiopeia':
@@ -197,7 +195,6 @@ if $signerLocation == 'self' {
         ensure => 'directory'
     }
     lxc::container { 'gitweb':
-        require => File['/data/git', '/run/gitweb-socket', '/run/git-smart-http-socket'],
         contname => 'gitweb',
         dir => ['/gitweb-socket', '/git-smart-http-socket', '/srv/git'],
         bind => {
index d2795b331c60c87a97b6d686be4a6277e8057e5c..0722b7684199d71bc1a388454b61765722513a4c 100644 (file)
@@ -68,7 +68,7 @@ class lxc {
           file_line { "lxc-$contname-mount-$out":
            path   => "/var/lib/lxc/$contname/config",
            line   => "lxc.mount.entry = $out ${in[target]} none bind${in[option]} 0 0",
-           require=> File_line["lxc-$contname-conf5"],
+           require=> [File_line["lxc-$contname-conf5"], File["$out"]],
            notify  => Exec["lxc-$contname-started"],
           }
         }