aboutsummaryrefslogtreecommitdiffstats
path: root/modules/buildsystem/manifests/iurt
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2012-03-16 22:46:23 +0000
committerMichael Scherer <misc@mageia.org>2012-03-16 22:46:23 +0000
commitb74151bf723df3fcadf24d2f6e00401bb69c1020 (patch)
treeca67dcadb418e482472167cca393fb4ac5a1b5b3 /modules/buildsystem/manifests/iurt
parent31adbee69aa33150bd8016837b85646a948f8ad7 (diff)
downloadpuppet-b74151bf723df3fcadf24d2f6e00401bb69c1020.tar
puppet-b74151bf723df3fcadf24d2f6e00401bb69c1020.tar.gz
puppet-b74151bf723df3fcadf24d2f6e00401bb69c1020.tar.bz2
puppet-b74151bf723df3fcadf24d2f6e00401bb69c1020.tar.xz
puppet-b74151bf723df3fcadf24d2f6e00401bb69c1020.zip
refactor completely iurt module ( maybe should even be moved out of buildsystem
module, since it tend to be too big )
Diffstat (limited to 'modules/buildsystem/manifests/iurt')
-rw-r--r--modules/buildsystem/manifests/iurt/config.pp11
-rw-r--r--modules/buildsystem/manifests/iurt/init.pp31
-rw-r--r--modules/buildsystem/manifests/iurt/packages.pp3
-rw-r--r--modules/buildsystem/manifests/iurt/user.pp13
4 files changed, 36 insertions, 22 deletions
diff --git a/modules/buildsystem/manifests/iurt/config.pp b/modules/buildsystem/manifests/iurt/config.pp
new file mode 100644
index 00000000..88c08b66
--- /dev/null
+++ b/modules/buildsystem/manifests/iurt/config.pp
@@ -0,0 +1,11 @@
+define buildsystem::iurt::config() {
+ $distribution = $name
+ # TODO rename the variable too in template
+ $build_login = $buildsystem::iurt::user::login
+
+ file { "/etc/iurt/build/$distribution.conf":
+ owner => $build_login,
+ group => $build_login,
+ content => template("buildsystem/iurt/$distribution.conf")
+ }
+}
diff --git a/modules/buildsystem/manifests/iurt/init.pp b/modules/buildsystem/manifests/iurt/init.pp
index e545f270..9f5780bd 100644
--- a/modules/buildsystem/manifests/iurt/init.pp
+++ b/modules/buildsystem/manifests/iurt/init.pp
@@ -1,42 +1,29 @@
class buildsystem::iurt {
include sudo
- include buildsystem::iurtuser
- $build_login = $buildsystem::base::build_login
- $build_home_dir = $buildsystem::base::build_home_dir
+ include buildsystem::iurt::user
+ include buildsystem::iurt::package
+ $login = $buildsystem::iurt::user::login
+ $homedir = $buildsystem::iurt::user::homedir
+
+ ssh::auth::client { $login: }
- ssh::auth::client { $build_login: }
ssh::auth::server { $buildsystem::base::sched_login:
- user => $build_login
+ user => $login
}
# remove old build directory
- tidy { "$build_home_dir/iurt":
+ tidy { "$homedir/iurt":
age => '8w',
recurse => true,
matches => ['[0-9][0-9].*\..*\..*\.[0-9]*','log','*.rpm','*.log','*.mga[0-9]+'],
rmdirs => true,
}
-# build node common settings
-# we could have the following skip list to use less space:
-# '/(drakx-installer-binaries|drakx-installer-advertising|gfxboot|drakx-installer-stage2|mandriva-theme)/'
- package { 'iurt': }
-
file { '/etc/iurt/build':
ensure => directory,
}
- define iurt_config() {
-
- $distribution = $name
- file { "/etc/iurt/build/$distribution.conf":
- owner => $buildsystem::iurt::build_login,
- group => $buildsystem::iurt::build_login,
- content => template("buildsystem/iurt/$distribution.conf")
- }
- }
-
- iurt_config { ['1','cauldron','mandriva2010.1','infra_1']: }
+ buildsystem::iurt::config { ['1','cauldron','mandriva2010.1','infra_1']: }
sudo::sudoers_config { 'iurt':
content => template('buildsystem/iurt/sudoers.iurt')
diff --git a/modules/buildsystem/manifests/iurt/packages.pp b/modules/buildsystem/manifests/iurt/packages.pp
new file mode 100644
index 00000000..448b4a89
--- /dev/null
+++ b/modules/buildsystem/manifests/iurt/packages.pp
@@ -0,0 +1,3 @@
+class buildsystem::iurt::packages {
+ package { 'iurt': }
+}
diff --git a/modules/buildsystem/manifests/iurt/user.pp b/modules/buildsystem/manifests/iurt/user.pp
new file mode 100644
index 00000000..a70c25c1
--- /dev/null
+++ b/modules/buildsystem/manifests/iurt/user.pp
@@ -0,0 +1,13 @@
+class buildsystem::iurt::user {
+ $login = 'iurt'
+ $homedir = "/home/$login"
+
+ sshuser { $login:
+ homedir => $homedir,
+ comment => 'System user used to run build bots',
+ }
+
+ file { '/etc/iurt':
+ ensure => directory,
+ }
+}