From 84f7ca76419eecc83cb2bddb048b2e3fb6e36386 Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 30 Oct 2009 20:35:30 +0100 Subject: introduce a class to manage unattended-upgrades --- manifests/init.pp | 4 ++++ manifests/unattended_upgrades.pp | 12 ++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 manifests/unattended_upgrades.pp (limited to 'manifests') diff --git a/manifests/init.pp b/manifests/init.pp index d6a8fb7..5dc0d75 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -41,6 +41,10 @@ class apt { } } + if $apt_unattended_upgrades { + include apt::unattended_upgrades + } + $apt_base_dir = "${module_dir_path}/apt" module_dir { apt: } # watch apt.conf.d diff --git a/manifests/unattended_upgrades.pp b/manifests/unattended_upgrades.pp new file mode 100644 index 0000000..f4544fa --- /dev/null +++ b/manifests/unattended_upgrades.pp @@ -0,0 +1,12 @@ +class apt::unattended_upgrades { + package{'unattended-upgrades': } + config_file { + "/etc/apt/apt.conf.d/unattended_upgrades": + content => "APT::Periodic::Update-Package-Lists "1"; +APT::Periodic::Unattended-Upgrade "1"; +", + before => File[apt_config], + require => Package['unattended-upgrades'], + } + } +} -- cgit v1.2.3