--- /dev/null
+class roles::static_base {
+ if ! $::staticsync_key {
+ exec { 'create-staticsync-key':
+ 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\'',
+ onlyif => '/usr/bin/getent passwd staticsync > /dev/null && ! [ -e /home/staticsync/.ssh/id_rsa ]'
+ }
+ }
+}
+# vim:set et:
+# vim:set sts=4 ts=4:
+# vim:set shiftwidth=4:
-class roles::static_master inherits roles::mirror_base {
+class roles::static_master inherits roles::static_base {
file {
'/etc/ssh/userkeys/staticsync':
content => template('roles/static-master-authorized_keys.erb'),
-class roles::static_mirror inherits roles::mirror_base {
+class roles::static_mirror inherits roles::static_base {
file {
'/etc/ssh/userkeys/staticsync':
content => template('roles/static-mirror-authorized_keys.erb'),