From: Silvio Rhatto Date: Sat, 26 Jan 2013 17:20:30 +0000 (-0200) Subject: Make custom_key_dir a class parameter and not a global variable X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=75bc1191e8d8694299bb1d228b053469955c976a;p=puppet-apt.git Make custom_key_dir a class parameter and not a global variable --- diff --git a/README b/README index f241a19..35a88b2 100644 --- a/README +++ b/README @@ -129,18 +129,6 @@ pull in the templates/site_apt/sources.list file: $custom_sources_list = template('site_apt/sources.list') -$custom_key_dir ---------------- - -If you have different apt-key files that you want to get added to your -apt keyring, you can set this variable to a path in your fileserver -where individual key files can be placed. If this is set and keys -exist there, this module will 'apt-key add' each key. - -The debian-archive-keyring package is installed and kept current up to the -latest revision (this includes the backports archive keyring). - - Classes ======= @@ -235,6 +223,16 @@ Class parameters: include apt::dist_upgrade class { 'apt': codename => 'wheezy', notify => Exec['apt_dist-upgrade'] } +* custom_key_dir + + If you have different apt-key files that you want to get added to your + apt keyring, you can set this variable to a path in your fileserver + where individual key files can be placed. If this is set and keys + exist there, this module will 'apt-key add' each key. + + The debian-archive-keyring package is installed and kept current up to the + latest revision (this includes the backports archive keyring). + apt::apticron ------------- diff --git a/manifests/init.pp b/manifests/init.pp index 020c1cc..d178925 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -15,7 +15,8 @@ class apt( $ubuntu_url = 'http://archive.ubuntu.com/ubuntu', $repos = 'auto', $custom_preferences = '', - $disable_update = false + $disable_update = false, + $custom_key_dir = false, ){ case $::operatingsystem { 'debian': { @@ -113,9 +114,9 @@ class apt( $apt_base_dir = "${common::moduledir::module_dir_path}/apt" modules_dir { 'apt': } - if $::custom_key_dir { + if $custom_key_dir { file { "${apt_base_dir}/keys.d": - source => $::custom_key_dir, + source => $custom_key_dir, recurse => true, owner => root, group => root,