Add saltstack APT repository to automatic upgrades
* modules/openstack_project/manifests/automatic_upgrades.pp: Pass the additional allowed origins list through to the unattended upgrades module. * modules/openstack_project/manifests/slave.pp: Add the "LP-PPA-saltstack-salt precise" repository origin to the list of allowed origins for automatic upgrades. * modules/unattended_upgrades/manifests/init.pp: Add a list of additional allowed origins for package repository upgrades and convert the apt-preferences stub for 50unattended-upgrades to a template so the list can be applied to it. * modules/unattended_upgrades/templates/50unattended-upgrades.erb: Renamed from ../../files/50unattended-upgrades and enhanced with a loop over the origins list to append to the default set of allowed upgrade origins. Change-Id: I821d199ae1a00ed78c2a52bf80ddba8a4eaa7d8b
This commit is contained in:
parent
40a4ec0a16
commit
a6202f901b
@ -1,10 +1,13 @@
|
|||||||
# == Class: openstack_project::automatic_upgrades
|
# == Class: openstack_project::automatic_upgrades
|
||||||
#
|
#
|
||||||
class openstack_project::automatic_upgrades (
|
class openstack_project::automatic_upgrades (
|
||||||
|
$origins = []
|
||||||
) {
|
) {
|
||||||
|
|
||||||
if $::osfamily == 'Debian' {
|
if $::osfamily == 'Debian' {
|
||||||
include unattended_upgrades
|
class { 'unattended_upgrades':
|
||||||
|
origins => [],
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if $::osfamily == 'RedHat' {
|
if $::osfamily == 'RedHat' {
|
||||||
include packagekit::cron
|
include packagekit::cron
|
||||||
|
@ -10,7 +10,9 @@ class openstack_project::slave (
|
|||||||
) {
|
) {
|
||||||
include openstack_project
|
include openstack_project
|
||||||
include openstack_project::tmpcleanup
|
include openstack_project::tmpcleanup
|
||||||
include openstack_project::automatic_upgrades
|
class { 'openstack_project::automatic_upgrades':
|
||||||
|
origins => ['LP-PPA-saltstack-salt precise'],
|
||||||
|
}
|
||||||
class { 'openstack_project::server':
|
class { 'openstack_project::server':
|
||||||
iptables_public_tcp_ports => [],
|
iptables_public_tcp_ports => [],
|
||||||
certname => $certname,
|
certname => $certname,
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
# == Class: unattended_upgrades
|
# == Class: unattended_upgrades
|
||||||
#
|
#
|
||||||
class unattended_upgrades($ensure = present) {
|
class unattended_upgrades(
|
||||||
|
$ensure = present,
|
||||||
|
$origins = []
|
||||||
|
) {
|
||||||
package { 'unattended-upgrades':
|
package { 'unattended-upgrades':
|
||||||
ensure => $ensure,
|
ensure => $ensure,
|
||||||
}
|
}
|
||||||
@ -23,7 +26,7 @@ class unattended_upgrades($ensure = present) {
|
|||||||
owner => 'root',
|
owner => 'root',
|
||||||
group => 'root',
|
group => 'root',
|
||||||
mode => '0444',
|
mode => '0444',
|
||||||
source => 'puppet:///modules/unattended_upgrades/50unattended-upgrades',
|
content => template('unattended_upgrades/50unattended-upgrades.erb'),
|
||||||
replace => true,
|
replace => true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,9 @@ Unattended-Upgrade::Allowed-Origins {
|
|||||||
"${distro_id} ${distro_codename}-security";
|
"${distro_id} ${distro_codename}-security";
|
||||||
"${distro_id} ${distro_codename}-updates";
|
"${distro_id} ${distro_codename}-updates";
|
||||||
// "${distro_id} ${distro_codename}-proposed-updates";
|
// "${distro_id} ${distro_codename}-proposed-updates";
|
||||||
|
<% origins.each do |origin| -%>
|
||||||
|
"<%= origin %>";
|
||||||
|
<% end -%>
|
||||||
};
|
};
|
||||||
|
|
||||||
// List of packages to not update
|
// List of packages to not update
|
Loading…
x
Reference in New Issue
Block a user