Puppet stringify facts

asked 2016-06-17 08:09:47 -0500

mobios gravatar image

Hello Community,

I have a problem with puppetdb and structured facts (hashes).

Hashes will be stringified through my puppetdb.

Ubuntu 14.04
puppetserver = 3.8.7
facter = 2.4.4
puppetdb = 2.3.8-1
puppetmaster-passenger = 3.8.7

In my puppet.conf on the clients and server i have included:
stringify_facts = false

Example file with the fact os (os should be identified as a hash)
File: test.pp
content: notify {$os['family']:}

If i test my manifest locally on the client with "puppet apply test.pp".
everthing is ok. I get the output 'windows'

If i edit my site.pp on my server --> notify {$os['family']:}
and do a puppetrun on the client i get the following errormessage.

`os is not a hash or array when accessing it with family'

The fact os will be identified as a string instead a hash.

After deactivating my puppetdb in my puppet.conf
'storeconfigs = false',

stop the service
'/etc/init.d/puppetdb stop'

and restart my puppetserver
'/etc/init.d/apache2 restart'

i make a new puppetrun on the client and the erromessage is gone os will be identified as a hash and i get the output -> windows.

Have anyone a idea ?


edit retag flag offensive close merge delete