]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
puppetmaster -> wheezy, Pt I
authorPeter Palfrader <peter@palfrader.org>
Wed, 29 May 2013 09:32:56 +0000 (09:32 +0000)
committerPeter Palfrader <peter@palfrader.org>
Wed, 29 May 2013 09:32:56 +0000 (09:32 +0000)
modules/debian-org/misc/hoster.yaml
modules/ferm/templates/me.conf.erb
modules/nagios/templates/obsolete-packages-ignore.d-hostspecific.erb
modules/puppetmaster/files/hiera.yaml
modules/puppetmaster/lib/puppet/parser/functions/allnodeinfo.rb
modules/puppetmaster/lib/puppet/parser/functions/entropy_provider.rb
modules/puppetmaster/lib/puppet/parser/functions/nodeinfo.rb
modules/puppetmaster/lib/puppet/parser/functions/yamlinfo.rb
modules/puppetmaster/manifests/init.pp
modules/site/manifests/params.pp [deleted file]
modules/site/templates/aptrepo.erb

index 3a8bfaa23e17cc99ee8b271446933801c610494b..48e80b7a8add147a45db2530e4b67b83771b6ab0 100644 (file)
@@ -150,7 +150,7 @@ ubcece:
     - 206.12.19.0/24
   searchpaths: [debprivate-ubc.debian.org]
   mirror-debian: http://mirror-ubc.debian.org/debian/
-  nameservers: [206.12.19.214, 2607:f8f0:610:4000:224:81ff:fea7:e952, 206.12.19.20, 2607:f8f0:610:4000:218:feff:fe76:2ed0, 206.12.19.21, 2607:f8f0:610:4000:21c:c4ff:fee5:e890]
+  nameservers: ['206.12.19.214', '2607:f8f0:610:4000:224:81ff:fea7:e952', '206.12.19.20', '2607:f8f0:610:4000:218:feff:fe76:2ed0', '206.12.19.21', '2607:f8f0:610:4000:21c:c4ff:fee5:e890']
 ugent:
   netrange:
     - 157.193.0.0/16
index 69b8fa5dd21280d50fe6e94210232e7d412b5a21..a6aebec5a7da56916dba20f994a77e97b401818d 100644 (file)
@@ -6,7 +6,7 @@
 <%=
 out = []
 
-restricted_purposes = {'kvm host', 'central syslog server', 'puppet master', 'jumphost'}
+restricted_purposes = ['kvm host', 'central syslog server', 'puppet master', 'jumphost']
 restrict_ssh = %w{lebrun geo1 geo2 geo3 beethoven tchaikovsky schroeder draghi}
 
 if (scope.lookupvar('site::nodeinfo')['ldap'].has_key?('purpose')) then
index f50eef92cdf9b3fa521a1155840062e8f52a42d4..813d7e639da442a09f67db2adcba4ec1b7b8ae71 100644 (file)
@@ -1,42 +1,38 @@
 ##
 ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
-## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
+## USE then git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
 ##
 
 <%=
 ignore = []
 case fqdn
-when "bellini.debian.org":              ignore << "mcelog"
-when "cilea.debian.org":                ignore << "/freeswitch.*/"
-when /draghi.debian.org/:               ignore << %w{userdir-ldap userdir-ldap-cgi libheimdal-kadm5-perl django-ldapdb}
-when /orff.debian.org/:                 ignore << %w{libnet-dns-sec-perl libnet-dns-zone-parser-perl}
-when /(zandonai|zelenka).debian.org/:   ignore << %w{samhain zabbix-agent rrdcollect}
-when /zappa.debian.org/:                ignore << %w{samhain}
-when /(mayer|corelli).debian.org/: ignore << "linux-base"
-when /(alkman|caballero|merulo|mundy).debian.org/: ignore << "samhain"
-when "franck.debian.org":               ignore << %w{python-apt}
-when /(abel|arnold|alain|alwyn|antheil|arne).debian.org/: ignore << %w{flash-kernel linux-firmware-image}
-when /harris.debian.org/:               ignore << %w{flash-kernel kernel linux-firmware-image}
-when /(hasse|hebden|henze|hildegard|howells|hummel|hoiby).debian.org/: ignore << %w{flash-kernel kernel linux-firmware-image schroot schroot-common}
-when /(parry|partch|piston).debian.org/: ignore << "yaboot"
-
-when "grieg.debian.org":                ignore << %w{dpkg}
-when "blavet.debian.org":               ignore << %w{dpkg-dev libdpkg-perl dpkg}
-when "handel.debian.org":               ignore << %w{puppet-dashboard}
-when "reger.debian.org":                ignore << %w{librt-extension-commandbymail-perl}
-when /(pasquini|tristano).debian.org/:  ignore << %w{ganeti-instance-image}
+when "bellini.debian.org" then                                 ignore << "mcelog"
+when "cilea.debian.org" then                                   ignore << "/freeswitch.*/"
+when /draghi.debian.org/ then                                  ignore << %w{userdir-ldap userdir-ldap-cgi libheimdal-kadm5-perl django-ldapdb}
+when /orff.debian.org/ then                                    ignore << %w{libnet-dns-sec-perl libnet-dns-zone-parser-perl}
+when /(zandonai|zelenka).debian.org/ then                      ignore << %w{samhain zabbix-agent rrdcollect}
+when /zappa.debian.org/ then                                   ignore << %w{samhain}
+when /(mayer|corelli).debian.org/ then                         ignore << "linux-base"
+when /(alkman|caballero|merulo|mundy).debian.org/ then         ignore << "samhain"
+when "franck.debian.org" then                                  ignore << %w{python-apt}
+when /(abel|arnold|alain|alwyn|antheil|arne).debian.org/ then  ignore << %w{flash-kernel linux-firmware-image}
+when /harris.debian.org/ then                                  ignore << %w{flash-kernel kernel linux-firmware-image}
+when /(hasse|hebden|henze|hildegard|howells|hummel|hoiby).debian.org/ then ignore << %w{flash-kernel kernel linux-firmware-image}
+when /(parry|partch|piston).debian.org/ then                   ignore << "yaboot"
+when "grieg.debian.org" then                                   ignore << %w{dpkg}
+when "blavet.debian.org" then                                  ignore << %w{dpkg-dev libdpkg-perl dpkg}
+when "handel.debian.org" then                                  ignore << %w{puppet-dashboard}
+when "reger.debian.org" then                                   ignore << %w{librt-extension-commandbymail-perl}
+when /(pasquini|tristano).debian.org/ then                     ignore << %w{ganeti-instance-image}
 end
 
 case fqdn
-when /geo[123].debian.org/: ignore << %w{geoip-database}
+when /geo[123].debian.org/ then                    ignore << %w{geoip-database}
 end
 
 if fqdn == "arne.debian.org"
-       ignore << %w{/linux-headers-.*/}
+    ignore << %w{/linux-headers-.*/}
 end
-#case fqdn
-#when /(draghi|orff|ravel|klecker|geo[123]).debian.org/: ignore << %w{libdns69 libdns66 libdns64 bind9 libbind9-60 liblwres60 bind9-host libisccfg62 libisccfg60 libisc62 libisc60 dnsutils bind9utils libisccc60}
-#end
 
 ignore.flatten.join("\n")
 %>
index 54fab8b91e2401183ba410214823b925e97d7421..216f65fc05b6e90a523629284d77ac0ae4fa3f35 100644 (file)
@@ -1,8 +1,8 @@
 ---
 :hierarchy:
-  - %{hoster}
-  - clusters/%{cluster}
-  - common
+  - '%{hoster}'
+  - 'clusters/%{cluster}'
+  - 'common'
 :backends:
   - yaml
 :yaml:
index 11baf101b880b170f5eb2c20a33b7bcee54cd3bc..012d58eac6700a222aac4b650ed025c35968cd6c 100644 (file)
@@ -4,7 +4,7 @@ module Puppet::Parser::Functions
       required = args.shift.split()
       optional = args.shift.split()
 
-      allhosts = function_ldapinfo('*', *(required+optional) )
+      allhosts = function_ldapinfo(['*', *(required+optional) ])
       res = {}
       allhosts.each_pair do |hostname, host|
           # If a returned value doesn't have all the attributes we're searching for, skip
index ef73e5dc7242711584cc19eed2839ef982f67e8b..19b3366f7eebfa1ad8410c6e7cf87b084de9ab57 100644 (file)
@@ -21,7 +21,7 @@ module Puppet::Parser::Functions
         next unless  localinfo[node]['entropy_key']
 
         addresses = allnodeinfo[node]['ipHostNumber']
-        thishoster = function_whohosts(addresses, "/etc/puppet/modules/debian-org/misc/hoster.yaml")
+        thishoster = function_whohosts([addresses, "/etc/puppet/modules/debian-org/misc/hoster.yaml"])
         name = thishoster['name']
 
         provider << node
index 7a02be462ec2d4b62d1d0416b99add756cfc5a32..cca270c5aec2ab041452a8d56ac2d656dcece977 100644 (file)
@@ -7,12 +7,12 @@ module Puppet::Parser::Functions
       require '/var/lib/puppet/lib/puppet/parser/functions/ldapinfo.rb'
       require '/var/lib/puppet/lib/puppet/parser/functions/whohosts.rb'
 
-      nodeinfo         = function_yamlinfo(host, yamlfile)
-      nodeinfo['ldap'] = function_ldapinfo(host, '*')
+      nodeinfo         = function_yamlinfo([host, yamlfile])
+      nodeinfo['ldap'] = function_ldapinfo([host, '*'])
       unless nodeinfo['ldap']['ipHostNumber']
         raise Puppet::ParseError, "Host #{host} does not have ipHostNumber values in ldap"
       end
-      nodeinfo['hoster'] = function_whohosts(nodeinfo['ldap']['ipHostNumber'], "/etc/puppet/modules/debian-org/misc/hoster.yaml")
+      nodeinfo['hoster'] = function_whohosts([nodeinfo['ldap']['ipHostNumber'], "/etc/puppet/modules/debian-org/misc/hoster.yaml"])
       nodeinfo['buildd'] = (nodeinfo['ldap']['purpose'].respond_to?('include?') && nodeinfo['ldap']['purpose'].include?('buildd'))
 
       if lookupvar('::mta') == 'exim4'
@@ -39,8 +39,8 @@ module Puppet::Parser::Functions
         end
       end
 
-      ns = function_hiera('nameservers')
-      allow_dns_q = function_hiera('allow_dns_query')
+      ns = function_hiera(['nameservers'])
+      allow_dns_q = function_hiera(['allow_dns_query'])
       if ns.empty?
         # no nameservers known for this hoster
         nodeinfo['misc']['resolver-recursive'] = true
index cb53ada9afb9474199d97cd69940033462007071..8f705c8d813730d31dd1185ee824b7f4f1e47d82 100644 (file)
@@ -6,7 +6,7 @@ module Puppet::Parser::Functions
     parser = Puppet::Parser::Parser.new(environment)
     parser.watch_file(yamlfile)
 
-    def read_yaml(yaml, host)
+    read_yaml = lambda { |yaml, host|
       results = {}
 
       ['nameinfo', 'footer'].each do |detail|
@@ -40,7 +40,7 @@ module Puppet::Parser::Functions
         end
       end
       return(results)
-    end
+    }
 
     require 'yaml'
     $KCODE = 'utf-8'
@@ -52,10 +52,10 @@ module Puppet::Parser::Functions
       Dir.entries('/var/lib/puppet/yaml/node/').each do |fname|
         next unless fname =~ /(.*)\.yaml$/
         host_name = $1
-        ret[host_name] = read_yaml(yaml, host_name)
+        ret[host_name] = read_yaml.call(yaml, host_name)
       end
     else
-      ret = read_yaml(yaml, host)
+      ret = read_yaml.call(yaml, host)
     end
 
     return(ret)
index 43432af7b188f95b7c0f70ccdfa2a9637ad05b18..f1c567dccd11fe39186833252aa6639f2d13f2a1 100644 (file)
@@ -1,9 +1,7 @@
 class puppetmaster {
 
-       include site::params
-
        package { 'puppetmaster':
-               ensure => $site::params::puppetversion,
+               ensure => installed,
        }
        file { '/etc/puppet/hiera.yaml':
                source => 'puppet:///modules/puppetmaster/hiera.yaml'
diff --git a/modules/site/manifests/params.pp b/modules/site/manifests/params.pp
deleted file mode 100644 (file)
index 211c45f..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-class site::params {
-       $puppetversion = $::hostname ? {
-               handel  => '2.7.18-3~bpo60+1',
-               default => '2.6.2-5+squeeze5',
-       }
-}
index a826fa276804f7ca54d7dabb1a9dc4bb2cbe286d..9469d138a1dfb872851682111f09fd0f4705b851 100644 (file)
@@ -3,4 +3,4 @@
 ### USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
 ###
 
-deb     <%= scope.lookupvar('url') %>  <%= scope.lookupvar('suite') %> <%= scope.lookupvar('components').to_a.join(' ') %>
+deb     <%= scope.lookupvar('url') %>  <%= scope.lookupvar('suite') %> <%= [scope.lookupvar('components')].flatten.join(' ') %>