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:
Dan Prince 2013-03-05 11:20:00 -05:00 committed by Jenkins
parent 5fead43d94
commit 7d003b8f68
2 changed files with 3 additions and 1 deletions

View File

@ -7,10 +7,12 @@ class openstack_project::params {
'Redhat': {
$packages = ['puppet', 'python-setuptools', 'wget']
$user_packages = ['byobu', 'emacs-nox']
$update_pkg_list_cmd = ''
}
'Debian', 'Ubuntu': {
$packages = ['puppet', 'python-setuptools', 'wget']
$user_packages = ['byobu', 'emacs23-nox']
$update_pkg_list_cmd = 'apt-get update >/dev/null 2>&1;'
}
default: {
fail("Unsupported osfamily: ${::osfamily} The 'openstack_project' module only supports osfamily Ubuntu or Redhat(slaves only).")

View File

@ -11,7 +11,7 @@ class openstack_project::puppet_cron($ensure = present)
ensure => $ensure,
user => 'root',
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',
}
logrotate::file { 'updatepuppet':