system-config/modules/openstack_project/manifests/puppetmaster.pp
Clark Boylan 002c77b547 Install salt master and add minions.
Install a salt master on the puppetmaster node and turn permanent
jenkins slaves into salt minions.

Change-Id: Ib7cba747ee545481a4d97d78ce6009cf5bb2374d
Reviewed-on: https://review.openstack.org/14303
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
2012-10-23 16:48:15 +00:00

36 lines
1.1 KiB
Puppet

class openstack_project::puppetmaster (
$sysadmins = []
) {
class { 'openstack_project::server':
iptables_public_tcp_ports => [4505, 4506, 8140],
sysadmins => $sysadmins
}
class { 'salt::master': }
cron { 'updatepuppetmaster':
user => 'root',
minute => '*/15',
command => 'sleep $((RANDOM\%600)) && cd /opt/openstack-ci-puppet/production && /usr/bin/git pull -q && /bin/bash install_modules.sh',
environment => 'PATH=/var/lib/gems/1.8/bin:/usr/bin:/bin:/usr/sbin:/sbin',
}
cron { 'deleteoldreports':
user => 'root',
hour => '3',
minute => '0',
command => 'sleep $((RANDOM\%600)) && find /var/lib/puppet/reports -name \'*.yaml\' -mtime +7 -execdir rm {} \;',
environment => 'PATH=/var/lib/gems/1.8/bin:/usr/bin:/bin:/usr/sbin:/sbin',
}
file { '/etc/puppet/hiera.yaml':
ensure => present,
owner => 'root',
group => 'root',
mode => '0555',
source => 'puppet:///modules/openstack_project/puppetmaster/hiera.yaml',
replace => true,
require => Class['openstack_project::server']
}
}