efe6a22aac
To /opt/config. Change-Id: Iab489ba398522dfd8e36dedb92d4d3f8d78df642 Reviewed-on: https://review.openstack.org/18177 Reviewed-by: Monty Taylor <mordred@inaugust.com> Reviewed-by: Jeremy Stanley <fungi@yuggoth.org> Approved: James E. Blair <corvus@inaugust.com> Reviewed-by: James E. Blair <corvus@inaugust.com> Tested-by: James E. Blair <corvus@inaugust.com>
38 lines
1.1 KiB
Puppet
38 lines
1.1 KiB
Puppet
# == Class: openstack_project::puppetmaster
|
|
#
|
|
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/config/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'],
|
|
}
|
|
}
|