/[adm]/puppet/modules/buildsystem/manifests/init.pp
ViewVC logotype

Annotation of /puppet/modules/buildsystem/manifests/init.pp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 386 - (hide annotations) (download)
Mon Nov 22 12:29:28 2010 UTC (13 years, 5 months ago) by blino
File size: 2436 byte(s)
useradd module does not support password change, use usermod

1 misc 213 class buildsystem {
2 dmorgan 86
3 boklm 356 class base {
4     $build_login = "iurt"
5 blino 382 $build_home_dir = "/home/iurt"
6 blino 366
7     include ssh::auth
8     ssh::auth::key { $build_login: } # declare a key for build bot: RSA, 2048 bits
9 boklm 356 }
10 boklm 355
11 boklm 356 class mainnode inherits base {
12 blino 381 include iurtuser
13 blino 366 ssh::auth::server { $build_login: }
14 blino 353
15 blino 350 package { "task-bs-cluster-main":
16     ensure => "installed"
17     }
18     }
19    
20 boklm 356 class buildnode inherits base {
21 misc 213 include iurt
22 dmorgan 86 }
23    
24 misc 265 class scheduler {
25     # ulri
26     }
27    
28     class dispatcher {
29     # emi
30     }
31    
32     class repsys {
33     package { 'repsys':
34    
35     }
36    
37    
38     }
39    
40 blino 351 class iurtuser {
41     group {"$build_login":
42     ensure => present,
43     }
44    
45     user {"$build_login":
46     ensure => present,
47 boklm 359 comment => "System user used to run build bots",
48 blino 351 managehome => true,
49     gid => $build_login,
50     shell => "/bin/bash",
51 blino 386 notify => Exec["unlock$build_login"],
52 blino 351 }
53 blino 372
54 blino 386 # set password to * to unlock the account but forbid login through login
55     exec { "unlock$build_login":
56     command => "usermod -p '*' $build_login",
57     refreshonly => true,
58     }
59    
60 blino 383 file { $build_home_dir:
61     ensure => "directory",
62     }
63    
64 blino 373 file { "$build_home_dir/.ssh":
65 blino 372 ensure => "directory",
66     mode => 600,
67     owner => $build_login,
68     group => $build_login,
69     }
70 blino 351 }
71    
72 misc 213 class iurt {
73 boklm 216 include sudo
74 blino 381 include iurtuser
75 blino 366 ssh::auth::client { $build_login: }
76 misc 213
77     # build node common settings
78     # we could have the following skip list to use less space:
79     # '/(drakx-installer-binaries|drakx-installer-advertising|gfxboot|drakx-installer-stage2|mandriva-theme)/'
80     $package_list = ['task-bs-cluster-chroot', 'iurt']
81     package { $package_list:
82     ensure => installed;
83     }
84    
85 blino 351 file { "$build_home_dir/.iurt.cauldron.conf":
86 misc 213 ensure => present,
87     owner => $build_login,
88     group => $build_login,
89     mode => 644,
90 boklm 218 content => template("buildsystem/iurt.cauldron.conf")
91 misc 213 }
92    
93 boklm 216 file { "/etc/sudoers.d/iurt":
94     ensure => present,
95     owner => root,
96     group => root,
97 boklm 219 mode => 440,
98 boklm 218 content => template("buildsystem/sudoers.iurt")
99 boklm 216 }
100 dmorgan 86 }
101     }

  ViewVC Help
Powered by ViewVC 1.1.30