old-style roles are gone
authorPeter Palfrader <peter@palfrader.org>
Sat, 28 Sep 2019 19:47:56 +0000 (21:47 +0200)
committerPeter Palfrader <peter@palfrader.org>
Sat, 28 Sep 2019 19:47:56 +0000 (21:47 +0200)
modules/deprecated/manifests/init.pp
modules/puppetmaster/lib/puppet/parser/functions/has_role.rb [deleted file]
modules/roles/templates/sso_rp/ca.crl.erb
modules/ssh/templates/authorized_keys.erb

index f3a8afe..f29c765 100644 (file)
@@ -3,5 +3,4 @@ class deprecated {
        $localinfo = yamlinfo('*')
        $nodeinfo  = nodeinfo($::fqdn)
        $allnodeinfo = allnodeinfo('sshRSAHostKey ipHostNumber', 'purpose mXRecord physicalHost purpose')
-        $roles = hiera('roles')
 }
diff --git a/modules/puppetmaster/lib/puppet/parser/functions/has_role.rb b/modules/puppetmaster/lib/puppet/parser/functions/has_role.rb
deleted file mode 100644 (file)
index eef31b9..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-module Puppet::Parser::Functions
-  newfunction(:has_role, :type => :rvalue) do |args|
-      role = args[0]
-      roles = lookupvar('deprecated::roles')
-      fqdn = lookupvar('fqdn')
-      if not roles.include?(role)
-        err "Failed to look up missing role #{role}"
-        return false
-      end
-      case roles[role]
-        when Hash then roles[role].include?(fqdn)
-        else roles[role].map{ |k|
-               case k
-                 when Hash then k.keys.first
-                 else k
-               end
-             }.include?(fqdn)
-      end
-  end
-end
index a10d51e..ecdf1c4 100644 (file)
@@ -11,7 +11,6 @@ end
 
 crl = []
 
-roles = scope.lookupvar('deprecated::roles')
 ['diabelli.debian.org'].each do |node|
   c = getcrl(node)
   next if c.nil?
index efb9391..311144a 100644 (file)
@@ -1,6 +1,5 @@
 <%
   allnodeinfo = scope.lookupvar('deprecated::allnodeinfo')
-  roles = scope.lookupvar('deprecated::roles')
 %>
 
 # local admin