diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2016-07-29 10:35:51 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2016-07-29 10:35:51 -0300 |
commit | 863f6ba863f78cfd6a22db3e5e33263646bd2b46 (patch) | |
tree | da13171e59dc1298b9b738d07ff413751b304060 /manifests/subsystem | |
parent | 5e394fe75cfa4d061454865496232bf660e58f7d (diff) | |
download | puppet-nodo-863f6ba863f78cfd6a22db3e5e33263646bd2b46.tar.gz puppet-nodo-863f6ba863f78cfd6a22db3e5e33263646bd2b46.tar.bz2 |
Adds back simpler nodo::subsystem::apt
Diffstat (limited to 'manifests/subsystem')
-rw-r--r-- | manifests/subsystem/apt.pp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/manifests/subsystem/apt.pp b/manifests/subsystem/apt.pp new file mode 100644 index 0000000..83d49aa --- /dev/null +++ b/manifests/subsystem/apt.pp @@ -0,0 +1,26 @@ +class nodo::subsystem::apt( + $ensure = present, + $auto_upgrade = present, +) { + file { '/etc/apt/sources.list': + ensure => $ensure ? { + 'present' => 'present', + default => undef, + }, + owner => root, + group => root, + mode => 0644, + content => template("nodo/apt/${::operatingsystem}.sources.list.erb"), + } + + $apt = '/usr/bin/apt-get' + $command = "${apt} update && ${apt} dist-upgrade -y && ${apt} autoremove -y && ${apt} clean" + + cron { 'nodo-apt-auto-upgrade': + ensure => $auto_upgrade, + command => $command, + user => 'root', + hour => 2, + minute => 0, + } +} |