Replace use of local apt module with upstream.
Change-Id: Idcf8af9712f8d10b50cfffc0aa74f7caa1a24c77 Reviewed-on: https://review.openstack.org/10833 Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Reviewed-by: James E. Blair <corvus@inaugust.com> Approved: Monty Taylor <mordred@inaugust.com> Tested-by: Jenkins
This commit is contained in:
commit
e8258e2b57
6
files/10periodic
Normal file
6
files/10periodic
Normal file
@ -0,0 +1,6 @@
|
||||
APT::Periodic::Enable "1";
|
||||
APT::Periodic::Update-Package-Lists "1";
|
||||
APT::Periodic::Download-Upgradeable-Packages "1";
|
||||
APT::Periodic::AutocleanInterval "5";
|
||||
APT::Periodic::Unattended-Upgrade "1";
|
||||
APT::Periodic::RandomSleep "1800";
|
30
files/50unattended-upgrades
Normal file
30
files/50unattended-upgrades
Normal file
@ -0,0 +1,30 @@
|
||||
// Automatically upgrade packages from these (origin, archive) pairs
|
||||
Unattended-Upgrade::Allowed-Origins {
|
||||
// ${distro_id} and ${distro_codename} will be automatically expanded
|
||||
"${distro_id} stable";
|
||||
"${distro_id} ${distro_codename}-security";
|
||||
"${distro_id} ${distro_codename}-updates";
|
||||
// "${distro_id} ${distro_codename}-proposed-updates";
|
||||
};
|
||||
|
||||
// List of packages to not update
|
||||
Unattended-Upgrade::Package-Blacklist {
|
||||
// "vim";
|
||||
// "libc6";
|
||||
// "libc6-dev";
|
||||
// "libc6-i686";
|
||||
};
|
||||
|
||||
// Send email to this address for problems or packages upgrades
|
||||
// If empty or unset then no email is sent, make sure that you
|
||||
// have a working mail setup on your system. The package 'mailx'
|
||||
// must be installed or anything that provides /usr/bin/mail.
|
||||
Unattended-Upgrade::Mail "root";
|
||||
|
||||
// Do automatic removal of new unused dependencies after the upgrade
|
||||
// (equivalent to apt-get autoremove)
|
||||
//Unattended-Upgrade::Remove-Unused-Dependencies "false";
|
||||
|
||||
// Automatically reboot *WITHOUT CONFIRMATION* if a
|
||||
// the file /var/run/reboot-required is found after the upgrade
|
||||
//Unattended-Upgrade::Automatic-Reboot "false";
|
28
manifests/init.pp
Normal file
28
manifests/init.pp
Normal file
@ -0,0 +1,28 @@
|
||||
class unattended_upgrades($ensure = present) {
|
||||
package { 'unattended-upgrades':
|
||||
ensure => $ensure;
|
||||
}
|
||||
|
||||
package { 'mailutils':
|
||||
ensure => $ensure;
|
||||
}
|
||||
|
||||
file { '/etc/apt/apt.conf.d/10periodic':
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => 444,
|
||||
ensure => $ensure,
|
||||
source => "puppet:///modules/unattended_upgrades/10periodic",
|
||||
replace => 'true',
|
||||
}
|
||||
|
||||
file { '/etc/apt/apt.conf.d/50unattended-upgrades':
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => 444,
|
||||
ensure => $ensure,
|
||||
source => "puppet:///modules/unattended_upgrades/50unattended-upgrades",
|
||||
replace => 'true',
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user