diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2018-06-19 15:39:19 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2018-06-19 15:39:19 -0300 |
commit | f4d75f5e67f1dc42709abfc4abdf8b9f05638162 (patch) | |
tree | 090dc511768f414571fd24d0d07659b6b1a366b2 | |
parent | 2fcf5d39f99c9029153bfcd6be3191fd722f729f (diff) | |
download | puppet-nodo-f4d75f5e67f1dc42709abfc4abdf8b9f05638162.tar.gz puppet-nodo-f4d75f5e67f1dc42709abfc4abdf8b9f05638162.tar.bz2 |
Adds nodo::subsystem::apt::repo
-rw-r--r-- | manifests/subsystem/apt/repo.pp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/manifests/subsystem/apt/repo.pp b/manifests/subsystem/apt/repo.pp new file mode 100644 index 0000000..b83f043 --- /dev/null +++ b/manifests/subsystem/apt/repo.pp @@ -0,0 +1,28 @@ +class nodo::subsystem::apt::repo( + $definition, + $key_source, +) { + file { "/etc/apt/trusted.gpg.d/${name}.gpg": + ensure => present, + owner => "root", + group => "root", + mode => "0644", + source => $source, + } + + file { "/etc/apt/sources.list.d/${name}.list": + ensure => present, + owner => "root", + group => "root", + mode => "0644", + content => "${definition}\n" + require => File["/etc/apt/trusted.gpg.d/${name}.gpg"], + notify => Exec["apt-repo-auto-update-${name}"], + } + + exec { "apt-repo-auto-update-${name}": + command => "/usr/bin/apt-get update", + user => "root", + refreshonly => true, + } +} |