diff options
author | Nicolas Vigier <boklm@mageia.org> | 2011-01-18 15:10:30 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2011-01-18 15:10:30 +0000 |
commit | 43c5580e6f735aef097244c4f6c6061bad5bf47b (patch) | |
tree | cac2d502eed80e4d4c76e216e564115339a95b30 | |
parent | 15721e3cd53e211911eaac923624c2440b61c234 (diff) | |
download | puppet-43c5580e6f735aef097244c4f6c6061bad5bf47b.tar puppet-43c5580e6f735aef097244c4f6c6061bad5bf47b.tar.gz puppet-43c5580e6f735aef097244c4f6c6061bad5bf47b.tar.bz2 puppet-43c5580e6f735aef097244c4f6c6061bad5bf47b.tar.xz puppet-43c5580e6f735aef097244c4f6c6061bad5bf47b.zip |
split mirror class in mirror::base and mirror::main
-rw-r--r-- | manifests/nodes.pp | 2 | ||||
-rw-r--r-- | modules/mirror/manifests/init.pp | 66 |
2 files changed, 35 insertions, 33 deletions
diff --git a/manifests/nodes.pp b/manifests/nodes.pp index 79b40af2..8c59a173 100644 --- a/manifests/nodes.pp +++ b/manifests/nodes.pp @@ -11,7 +11,7 @@ node valstar { include default_mageia_server timezone::timezone { "Europe/Paris": } include rsyncd - include mirror + include mirror::main include openldap::master include subversion::client include subversion::server diff --git a/modules/mirror/manifests/init.pp b/modules/mirror/manifests/init.pp index 512b0463..5a752f81 100644 --- a/modules/mirror/manifests/init.pp +++ b/modules/mirror/manifests/init.pp @@ -1,40 +1,42 @@ class mirror { + class base { + file { "/home/mirror/bin/": + ensure => directory, + owner => mirror, + group => mirror, + mode => 755 + } - file { "update_timestamp": - path => "/home/mirror/bin/update_timestamp", - ensure => present, - owner => mirror, - group => mirror, - mode => 755, - content => template("mirror/update_timestamp") - } - - file { "/home/mirror/bin/": - ensure => directory, - owner => mirror, - group => mirror, - mode => 755 - } + group {"mirror": + ensure => present, + } - group {"mirror": - ensure => present, - } - - user {"mirror": - ensure => present, - comment => "System user use to run mirror scripts", - managehome => true, - gid => mirror, - shell => "/bin/bash", + user {"mirror": + ensure => present, + comment => "System user use to run mirror scripts", + managehome => true, + gid => mirror, + shell => "/bin/bash", + } } + # For main Mageia mirror + class main inherits base { + file { "update_timestamp": + path => "/home/mirror/bin/update_timestamp", + ensure => present, + owner => mirror, + group => mirror, + mode => 755, + content => template("mirror/update_timestamp") + } - cron { mirror: - user => mirror, - hour => 10, - minute => 14, - command => "~mirror/bin/update_timestamp", - require => File["update_timestamp"], + cron { mirror: + user => mirror, + hour => 10, + minute => 14, + command => "~mirror/bin/update_timestamp", + require => File["update_timestamp"], + } } - } |