fraenki / puppet-sshkeys

Puppet module to manage ssh public keys.
https://forge.puppetlabs.com/fraenki/sshkeys
BSD 2-Clause "Simplified" License
9 stars 9 forks source link

future parser #3

Closed PHaroZ closed 7 years ago

PHaroZ commented 9 years ago

with parser: future in puppet.conf. If i do

  class { '::sshkeys': 
    users => {
      'root' => {
        'home' => '/root',
        'keys' => {
          'adm01' => {'type'=>'ssh-dss', 'key'=>$rootUserKey},
        },
      },
    },
  }

and no definition for sshkeys::users in hiera I've got this error :

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Function Call, create_resources(): second argument must be a hash at /etc/puppet/modules/sshkeys/manifests/init.pp:26:5 on node xxxxxxx

After some testing i've found that

$hiera_users = hiera_hash('sshkeys::users',undef)

in init.pp:16 seems not returning undef (and I can not get return type because type function from stdlib doesn't work with future parser) To avoid temporarily this issue i have to replace this line by a simple

$hiera_users = undef

This was tested with :merge_behavior: deeper and :merge_behavior: native.

artem-sidorenko commented 9 years ago

@PHaroZ Sry, I saw the issue only now..I will take a look in the next days