diff options
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/init.pp | 1 | ||||
-rw-r--r-- | manifests/key.pp | 13 | ||||
-rw-r--r-- | manifests/key/plain.pp | 13 | ||||
-rw-r--r-- | manifests/params.pp | 1 |
4 files changed, 28 insertions, 0 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index 5aaa13a..fc93eb3 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -6,6 +6,7 @@ class apt( $use_lts = $apt::params::use_lts, $use_volatile = $apt::params::use_volatile, + $use_backports = $apt::params::use_backports, $include_src = $apt::params::include_src, $use_next_release = $apt::params::use_next_release, $debian_url = $apt::params::debian_url, diff --git a/manifests/key.pp b/manifests/key.pp new file mode 100644 index 0000000..65b62e9 --- /dev/null +++ b/manifests/key.pp @@ -0,0 +1,13 @@ +define apt::key ($source, $ensure = 'present') { + validate_re( + $name, '\.gpg$', + 'An apt::key resource name must have the .gpg extension', + ) + + file { + "/etc/apt/trusted.gpg.d/${name}": + ensure => $ensure, + source => $source, + notify => Exec['refresh_apt'], + } +} diff --git a/manifests/key/plain.pp b/manifests/key/plain.pp new file mode 100644 index 0000000..e4a2f89 --- /dev/null +++ b/manifests/key/plain.pp @@ -0,0 +1,13 @@ +define apt::key::plain ($source) { + file { + "${apt::apt_base_dir}/keys/${name}": + source => $source; + "${apt::apt_base_dir}/keys": + ensure => directory; + } + exec { "apt-key add '${apt::apt_base_dir}/keys/${name}'": + subscribe => File["${apt::apt_base_dir}/keys/${name}"], + refreshonly => true, + notify => Exec['refresh_apt'], + } +} diff --git a/manifests/params.pp b/manifests/params.pp index da531db..9c85b6f 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -1,6 +1,7 @@ class apt::params () { $use_lts = false $use_volatile = false + $use_backports = true $include_src = false $use_next_release = false $debian_url = 'http://httpredir.debian.org/debian/' |