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