]> gitweb.fluxo.info Git - puppet-apt.git/commitdiff
Make custom_key_dir a class parameter and not a global variable
authorSilvio Rhatto <rhatto@riseup.net>
Sat, 26 Jan 2013 17:20:30 +0000 (15:20 -0200)
committerMicah Anderson <micah@riseup.net>
Tue, 25 Jun 2013 19:35:11 +0000 (15:35 -0400)
Conflicts:
manifests/init.pp

README
manifests/init.pp
manifests/params.pp

diff --git a/README b/README
index f241a19d92ce09d1062ab414244fe83a9bb2faaa..35a88b25586a1da55e7d4399b50f56581b8f8253 100644 (file)
--- 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
 -------------
 
index 3f8e1c8655fbf1fa91de179ac8cc27cf2ad4a2b0..de28c23d5378fb756a3e13dc7af2ab402ebd19a5 100644 (file)
@@ -15,7 +15,8 @@ class apt(
   $ubuntu_url = $apt::params::ubuntu_url,
   $repos = $apt::params::repos,
   $custom_preferences = $apt::params::custom_preferences,
-  $disable_update = $apt::params::disable_update
+  $disable_update = $apt::params::disable_update,
+  $custom_key_dir = $apt::params::custom_key_dir
 ) inherits apt::params {
   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,
index b210ff640423acec72fc7efe10a31cca9df209af..12273ac23956b195ca8c3deb19c88464a3852d2f 100644 (file)
@@ -14,4 +14,5 @@ class apt::params () {
   $repos = 'auto'
   $custom_preferences = ''
   $disable_update = false
+  $custom_key_dir = false
 }