]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/roles/manifests/static_base.pp
merge mirror and master authorized_keys and wrapper script
[dsa-puppet.git] / modules / roles / manifests / static_base.pp
1 class roles::static_base {
2         if ! $::staticsync_key {
3                 exec { 'create-staticsync-key':
4                         command => '/bin/su - staticsync -c \'mkdir -p -m 02700 .ssh && ssh-keygen -C "`whoami`@`hostname` (`date +%Y-%m-%d`)" -P "" -f .ssh/id_rsa -q\'',
5                         onlyif  => '/usr/bin/getent passwd staticsync > /dev/null && ! [ -e /home/staticsync/.ssh/id_rsa ]'
6                 }
7         }
8
9         file { '/etc/static-components.conf':
10                 source => 'puppet:///modules/roles/static-mirroring/static-components.conf',
11         }
12
13         file { '/etc/ssh/userkeys/staticsync':
14                 content => template('roles/static-mirroring/static-authorized_keys.erb'),
15         }
16
17         file { '/usr/local/bin/staticsync-ssh-wrap':
18                 source => 'puppet:///modules/roles/static-mirroring/staticsync-ssh-wrap',
19                 mode   => '0555',
20         }
21         file { '/usr/local/bin/static-mirror-ssh-wrap': ensure => absent; }
22         file { '/usr/local/bin/static-master-ssh-wrap': ensure => absent; }
23 }