Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: modules/base/manifests/init.pp

Issue 4810150141493248: Issue 122 - Puppet ENC via Hiera (Closed)
Patch Set: Created Sept. 8, 2014, 11:56 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 class base { 1 class base {
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 class {'apt': 9 class {'apt':
10 always_apt_update => true 10 always_apt_update => true
(...skipping 21 matching lines...) Expand all
32 } 32 }
33 33
34 service {'cron': 34 service {'cron':
35 ensure => running, 35 ensure => running,
36 enable => true, 36 enable => true,
37 } 37 }
38 38
39 class {'logrotate': 39 class {'logrotate':
40 stage => 'post' 40 stage => 'post'
41 } 41 }
42
43 $servers = hiera("servers")
44 create_resources(base::explicit_host_record, $servers)
45
46 define explicit_host_record($ip, $ssh_public_key=undef){
47 host{"$name,$ip":
Wladimir Palant 2014/09/09 18:15:06 Will this work correctly for hosts that have multi
mathias 2014/10/08 03:02:33 It will, although the host{$key:} looks awkward th
48 ensure => present,
49 ip => $ip,
50 name => "$name.adblockplus.org",
Wladimir Palant 2014/09/09 18:15:06 Unfortunately, this isn't all that simple right no
mathias 2014/10/08 03:02:33 Done.
51 }
52
53 if $ssh_public_key != undef {
54 @sshkey{$name:
55 key => $ssh_public_key,
56 type => ssh-rsa,
Wladimir Palant 2014/09/09 18:15:06 Not sure but I guess that the IP addresses of the
mathias 2014/10/08 03:02:33 Done.
57 }
58 }
59 }
42 } 60 }
61
OLDNEW

Powered by Google App Engine
This is Rietveld