Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

downcasing certname as puppet does

  • Loading branch information...
commit d6139d3d39c769a1b1785412ee2c9c7bae7e1281 1 parent 84e58b6
Ari Pringle authored December 28, 2012
2  agent/provision.rb
@@ -11,7 +11,7 @@ def startup_hook
11 11
         certname = PluginManager["facts_plugin"].get_fact("fqdn")
12 12
         certname = config.identity unless certname
13 13
 
14  
-        @puppetcert = config.pluginconf.fetch("provision.certfile", "/var/lib/puppet/ssl/certs/#{certname}.pem")
  14
+        @puppetcert = config.pluginconf.fetch("provision.certfile", "/var/lib/puppet/ssl/certs/#{certname.downcase}.pem")
15 15
         @lockfile = config.pluginconf.fetch("provision.lockfile", "/etc/mcollective/provisioner.lock")
16 16
         @disablefile = config.pluginconf.fetch("provision.disablefile", "/etc/mcollective/provisioner.disable")
17 17
         @puppet = config.pluginconf.fetch("provision.puppet", "/usr/bin/puppet agent")
4  lib/mcprovision/runner.rb
@@ -80,11 +80,11 @@ def provision(node)
80 80
 
81 81
       # Only do certificate management if the node is clean and doesnt already have a cert
82 82
       unless node.has_cert?
83  
-        @master.clean_cert(node.hostname) if @config.settings["steps"]["clean_node_certname"]
  83
+        @master.clean_cert(node.hostname.downcase) if @config.settings["steps"]["clean_node_certname"]
84 84
 
85 85
         node.send_csr if @config.settings["steps"]["send_node_csr"]
86 86
 
87  
-        @master.sign(node.hostname) if @config.settings["steps"]["sign_node_csr"]
  87
+        @master.sign(node.hostname.downcase) if @config.settings["steps"]["sign_node_csr"]
88 88
       else
89 89
         MCProvision.info("Skipping SSL certificate management for node - already has a cert")
90 90
       end

0 notes on commit d6139d3

Please sign in to comment.
Something went wrong with that request. Please try again.