lightoze / puppet-bacula

Manage Bacula backup system with Puppet
2 stars 4 forks source link

trusted is not a hash or array when accessing it with certname at modules/bacula/manifests/params.pp:45 on node #3

Open 030 opened 8 years ago

030 commented 8 years ago

Issue occurs when the following has been defined

    class { '::bacula::director': }
    class { '::bacula::console': }
    class { '::bacula::storage': }
    class { '::bacula::client': }

mod 'lightoze/bacula', '0.0.4'

trusted is not a hash or array when accessing it with certname at modules/bacula/manifests/params.pp:45 on node

The snippet that is causing the issue:

  $director_port = 9101
  $director_password = sha1("${trusted['certname']}-dir-${::sshrsakey}")
  $director_queryfile = '/etc/bacula/scripts/query.sql'

Where does trusted come from? sshrsakey is a fact and does not seem to cause the issue as facter returns a key.

Thise issue (https://ask.puppet.com/question/19949/creating-custom-facts-how-to-access-the-trusted-hash/) looks related.

How to solve this issue?

lightoze commented 8 years ago

What Puppet version are you using?

lightoze commented 8 years ago

This is from where it comes from, nothing special: https://docs.puppet.com/puppet/latest/reference/lang_facts_and_builtin_vars.html#trusted-facts It works fine for me on Puppet v4.3.2

030 commented 8 years ago

We are using Puppet 3.6. I will upgrade and let you know the outcome.