owner => buildd,
}
- if ! $::buildd_key {
- exec { 'create-buildd-key':
- command => '/bin/su - buildd -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 buildd > /dev/null && ! [ -e /home/buildd/.ssh/id_rsa ]'
- }
- }
+ ssh::keygen {'buildd': }
#
# buildd/pybuildd configuration
# for now this will have to be done manually
if $::portforwarder_user_exists {
- if ! $::portforwarder_key {
- exec { 'create-portforwarder-key':
- command => '/bin/su - portforwarder -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 portforwarder > /dev/null && ! [ -e /home/portforwarder/.ssh/id_rsa ]'
- }
- }
+ ssh::keygen {'portforwarder': }
file { '/etc/ssh/userkeys/portforwarder':
content => template('portforwarder/authorized_keys.erb'),
content => template('roles/postgresql_server/pg-backup-file.conf.erb'),
}
- if ! $::postgres_key {
- exec { 'create-postgres-key':
- command => '/bin/su - postgres -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 postgres > /dev/null && ! [ -e /var/lib/postgresql/.ssh/id_rsa ]'
- }
- }
+ ssh::keygen {'postgres': }
if $::hostname in [melartin, vittoria] {
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 ]'
- }
- }
+ ssh::keygen {'staticsync': }
file { '/etc/static-components.conf':
content => template('roles/static-mirroring/static-components.conf.erb'),
class roles::weblog_provider {
- if ! $::weblogsync_key {
- exec { 'create-weblogsync-key':
- command => '/bin/su - weblogsync -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 weblogsync > /dev/null && ! [ -e /home/weblogsync/.ssh/id_rsa ]'
- }
- } else {
- file { '/etc/cron.d/puppet-weblog-provider': ensure => absent, }
- concat::fragment { 'dsa-puppet-stuff--weblog-provider':
- target => '/etc/cron.d/dsa-puppet-stuff',
- content => @(EOF)
- 0 1 * * * weblogsync sleep $((RANDOM \% 1800)); rsync -a --delete-excluded --include 'www.debian.org-access.log-*gz' --include '*-public-access.log-*gz' --exclude '**' /var/log/apache2/. weblogsync@wolkenstein.debian.org:-weblogs-incoming-
- | EOF
- }
- }
+ ssh::keygen {'weblogsync': }
+
+ file { '/etc/cron.d/puppet-weblog-provider': ensure => absent, }
+ concat::fragment { 'dsa-puppet-stuff--weblog-provider':
+ target => '/etc/cron.d/dsa-puppet-stuff',
+ content => @(EOF)
+ 0 1 * * * weblogsync sleep $((RANDOM \% 1800)); rsync -a --delete-excluded --include 'www.debian.org-access.log-*gz' --include '*-public-access.log-*gz' --exclude '**' /var/log/apache2/. weblogsync@wolkenstein.debian.org:-weblogs-incoming-
+ | EOF
+ }
}