[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, master, updated. debian/0.24.6-1-356-g5718585

James Turnbull james at lovedthanlost.net
Fri Jan 23 14:20:47 UTC 2009


The following commit has been merged in the master branch:
commit 18dda20b4167cb24ecd0d8b2029aaabb60b79936
Author: James Turnbull <james at lovedthanlost.net>
Date:   Wed Aug 13 10:06:28 2008 +1000

    Fixed $1456 - add proxy configuration to yum repo

diff --git a/CHANGELOG b/CHANGELOG
index ab70546..eb22e6b 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,6 @@
 0.24.x
+    Fixed $1456 - add proxy configuration capability to yum repo
+
     Fixed #1457 - removed confine warning
 
     A working script to create an OS X pkg out of the Puppet repository
diff --git a/lib/puppet/type/yumrepo.rb b/lib/puppet/type/yumrepo.rb
index d19b5a4..15e0319 100644
--- a/lib/puppet/type/yumrepo.rb
+++ b/lib/puppet/type/yumrepo.rb
@@ -346,7 +346,23 @@ module Puppet
             newvalue(%r{[1-9][0-9]?}) { }
         end
 
-        
-        
+        newproperty(:proxy, :parent => Puppet::IniProperty) do
+            desc "URL to the proxy server for this repository.\n#{ABSENT_DOC}"
+            newvalue(:absent) { self.should = :absent }
+            # Should really check that it's a valid URL
+            newvalue(/.*/) { }
+        end
+
+        newproperty(:proxy_username, :parent => Puppet::IniProperty) do
+            desc "Username for this proxy.\n#{ABSENT_DOC}"
+            newvalue(:absent) { self.should = :absent }
+            newvalue(/.*/) { }
+        end
+
+        newproperty(:proxy_password, :parent => Puppet::IniProperty) do
+            desc "Password for this proxy.\n#{ABSENT_DOC}"
+            newvalue(:absent) { self.should = :absent }
+            newvalue(/.*/) { }
+        end
     end
 end
diff --git a/test/ral/type/yumrepo.rb b/test/ral/type/yumrepo.rb
index 899a021..21865e6 100755
--- a/test/ral/type/yumrepo.rb
+++ b/test/ral/type/yumrepo.rb
@@ -47,7 +47,10 @@ class TestYumRepo < Test::Unit::TestCase
             :enabled => "1",
             :gpgcheck => "1",
             :includepkgs => "absent",
-            :gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora"
+            :gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora",
+            :proxy => "http://proxy.example.com:80/",
+            :proxy_username => "username",
+            :proxy_password => "password"
         }
         repo = make_repo("base", values)
 
@@ -101,6 +104,9 @@ baseurl=http://example.com/yum/$releasever/$basearch/os/
 enabled=1
 gpgcheck=1
 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
+proxy=http://proxy.example.com:80/
+proxy_username=username
+proxy_password=password
 EOF
 
 end        

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list