Add update_pkg_list_cmd to openstack_project.
Add a new update_pkg_list_cmd parameter to the openstack_project module so we can control what each distribution runs to update package lists. On Ubuntu we want to run 'apt-get update' and on RHEL we want to run nothing since yum does this automatically. Change-Id: Iab08930bac5f992711b05bcbfa23b7daab12a060 Reviewed-on: https://review.openstack.org/23571 Reviewed-by: Jeremy Stanley <fungi@yuggoth.org> Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Approved: Jeremy Stanley <fungi@yuggoth.org> Tested-by: Jenkins
This commit is contained in:
parent
5fead43d94
commit
7d003b8f68
@ -7,10 +7,12 @@ class openstack_project::params {
|
|||||||
'Redhat': {
|
'Redhat': {
|
||||||
$packages = ['puppet', 'python-setuptools', 'wget']
|
$packages = ['puppet', 'python-setuptools', 'wget']
|
||||||
$user_packages = ['byobu', 'emacs-nox']
|
$user_packages = ['byobu', 'emacs-nox']
|
||||||
|
$update_pkg_list_cmd = ''
|
||||||
}
|
}
|
||||||
'Debian', 'Ubuntu': {
|
'Debian', 'Ubuntu': {
|
||||||
$packages = ['puppet', 'python-setuptools', 'wget']
|
$packages = ['puppet', 'python-setuptools', 'wget']
|
||||||
$user_packages = ['byobu', 'emacs23-nox']
|
$user_packages = ['byobu', 'emacs23-nox']
|
||||||
|
$update_pkg_list_cmd = 'apt-get update >/dev/null 2>&1;'
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
fail("Unsupported osfamily: ${::osfamily} The 'openstack_project' module only supports osfamily Ubuntu or Redhat(slaves only).")
|
fail("Unsupported osfamily: ${::osfamily} The 'openstack_project' module only supports osfamily Ubuntu or Redhat(slaves only).")
|
||||||
|
@ -11,7 +11,7 @@ class openstack_project::puppet_cron($ensure = present)
|
|||||||
ensure => $ensure,
|
ensure => $ensure,
|
||||||
user => 'root',
|
user => 'root',
|
||||||
minute => '*/15',
|
minute => '*/15',
|
||||||
command => 'apt-get update >/dev/null 2>&1 ; sleep $((RANDOM\%600)) && puppet agent --test >>/var/log/manifest.log',
|
command => "${::openstack_project::params::update_pkg_list_cmd}sleep $((RANDOM\%600)) && puppet agent --test >>/var/log/manifest.log",
|
||||||
environment => 'PATH=/var/lib/gems/1.8/bin:/usr/bin:/bin:/usr/sbin:/sbin',
|
environment => 'PATH=/var/lib/gems/1.8/bin:/usr/bin:/bin:/usr/sbin:/sbin',
|
||||||
}
|
}
|
||||||
logrotate::file { 'updatepuppet':
|
logrotate::file { 'updatepuppet':
|
||||||
|
Loading…
Reference in New Issue
Block a user