OLD | NEW |
1 class base ($zone='adblockplus.org') { | 1 class base ($zone='adblockplus.org') { |
2 stage {'pre': before => Stage['main']} | |
3 stage {'post': require => Stage['main']} | |
4 | 2 |
5 class {'users': | 3 include postfix, ssh, stdlib |
6 stage => 'pre', | |
7 } | |
8 | |
9 include postfix, ssh | |
10 | 4 |
11 package {['mercurial', 'vim', 'emacs', 'debian-goodies', 'htop']: | 5 package {['mercurial', 'vim', 'emacs', 'debian-goodies', 'htop']: |
12 ensure => present, | 6 ensure => present, |
13 } | 7 } |
14 | 8 |
15 service {'cron': | 9 service {'cron': |
16 ensure => running, | 10 ensure => running, |
17 enable => true, | 11 enable => true, |
18 } | 12 } |
19 | 13 |
| 14 class {'users': |
| 15 stage => 'setup', |
| 16 } |
| 17 |
20 class {'logrotate': | 18 class {'logrotate': |
21 stage => 'post' | 19 stage => 'runtime', |
22 } | 20 } |
23 | 21 |
24 $servers = hiera('servers') | 22 $servers = hiera('servers') |
25 create_resources(base::explicit_host_record, $servers) | 23 create_resources(base::explicit_host_record, $servers) |
26 | 24 |
27 define explicit_host_record( | 25 define explicit_host_record( |
28 $ip, | 26 $ip, |
29 $ssh_public_key = undef, | 27 $ssh_public_key = undef, |
30 $role = undef, | 28 $role = undef, |
31 $dns = undef, | 29 $dns = undef, |
(...skipping 24 matching lines...) Expand all Loading... |
56 public_key => $public_key, | 54 public_key => $public_key, |
57 } | 55 } |
58 | 56 |
59 # Implicit realization behavior has been introduced by accident in a | 57 # Implicit realization behavior has been introduced by accident in a |
60 # previous version, hence it should be kept until class base is obsolete | 58 # previous version, hence it should be kept until class base is obsolete |
61 # and the obsolete records have been removed | 59 # and the obsolete records have been removed |
62 realize(Host[$title]) | 60 realize(Host[$title]) |
63 realize(Sshkey[$title]) | 61 realize(Sshkey[$title]) |
64 } | 62 } |
65 } | 63 } |
OLD | NEW |