diff --git a/modules/openstack_project/manifests/automatic_upgrades.pp b/modules/openstack_project/manifests/automatic_upgrades.pp index 329bedef7e..20fb82af24 100644 --- a/modules/openstack_project/manifests/automatic_upgrades.pp +++ b/modules/openstack_project/manifests/automatic_upgrades.pp @@ -1,10 +1,13 @@ # == Class: openstack_project::automatic_upgrades # class openstack_project::automatic_upgrades ( + $origins = [] ) { if $::osfamily == 'Debian' { - include unattended_upgrades + class { 'unattended_upgrades': + origins => [], + } } if $::osfamily == 'RedHat' { include packagekit::cron diff --git a/modules/openstack_project/manifests/slave.pp b/modules/openstack_project/manifests/slave.pp index 6cf964f3a0..b77fed8b41 100644 --- a/modules/openstack_project/manifests/slave.pp +++ b/modules/openstack_project/manifests/slave.pp @@ -10,7 +10,9 @@ class openstack_project::slave ( ) { include openstack_project include openstack_project::tmpcleanup - include openstack_project::automatic_upgrades + class { 'openstack_project::automatic_upgrades': + origins => ['LP-PPA-saltstack-salt precise'], + } class { 'openstack_project::server': iptables_public_tcp_ports => [], certname => $certname, diff --git a/modules/unattended_upgrades/manifests/init.pp b/modules/unattended_upgrades/manifests/init.pp index d04ffc008d..c4a755574a 100644 --- a/modules/unattended_upgrades/manifests/init.pp +++ b/modules/unattended_upgrades/manifests/init.pp @@ -1,6 +1,9 @@ # == Class: unattended_upgrades # -class unattended_upgrades($ensure = present) { +class unattended_upgrades( + $ensure = present, + $origins = [] +) { package { 'unattended-upgrades': ensure => $ensure, } @@ -23,7 +26,7 @@ class unattended_upgrades($ensure = present) { owner => 'root', group => 'root', mode => '0444', - source => 'puppet:///modules/unattended_upgrades/50unattended-upgrades', + content => template('unattended_upgrades/50unattended-upgrades.erb'), replace => true, } } diff --git a/modules/unattended_upgrades/files/50unattended-upgrades b/modules/unattended_upgrades/templates/50unattended-upgrades.erb similarity index 94% rename from modules/unattended_upgrades/files/50unattended-upgrades rename to modules/unattended_upgrades/templates/50unattended-upgrades.erb index 5faa45e60d..2815768e78 100644 --- a/modules/unattended_upgrades/files/50unattended-upgrades +++ b/modules/unattended_upgrades/templates/50unattended-upgrades.erb @@ -5,6 +5,9 @@ Unattended-Upgrade::Allowed-Origins { "${distro_id} ${distro_codename}-security"; "${distro_id} ${distro_codename}-updates"; // "${distro_id} ${distro_codename}-proposed-updates"; +<% origins.each do |origin| -%> + "<%= origin %>"; +<% end -%> }; // List of packages to not update