I'm seeing the following errors pop up:
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: The value 'certdir' cannot be converted to Numeric. on node agent1.puppetlabs.vm
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
This results from the following code:
$sslpaths = {
'certdir' => 'certs',
'privatedir' => 'private',
'privatekeydir' => 'private_keys',
'publickeydir' => 'public_keys',
'requestdir' => 'certificate_requests',
}
$sslpaths.each |String $setting, String $subdir| {
#notify { "The output is: ${::puppet_sslpaths[$setting]['path_exists']}":}
notify { "The output is: ${::puppet_sslpaths[$setting]}":}
#if $::puppet_sslpaths[$setting]['path_exists'] {
# file { "${ssl_dir}/${subdir}":
# ensure => directory,
# source => $::puppet_sslpaths[$setting]['path'],
# backup => false,
# recurse => true,
# }
#}
}
}
This code comes from the puppet_agent::prepare::ssl class in the puppet_agent module you can find here --> https://github.com/puppetlabs/puppetlabs-puppet_agent/blob/master/manifests/prepare/ssl.pp#L26-L35
What I'm THINKING is that it's having a hard time dereferencing the hash element based on a variable that was cast to a String (i.e. $setting). It's trying to cast that to a numeric value, and there's the error message, but I'm still trying to do some debugging...
Running into the same issue. Did you find a work around?