Ask Your Question
0

future parser not working

asked 2014-03-31 08:01:39 -0500

kariboe gravatar image

updated 2014-03-31 08:05:38 -0500

Puppet: 3.4.3 (Puppet Enterprise 3.2.0) Facter: 1.7.5

Fairly new to Puppet but I'm playing with Puppet Enterprise to manage my nodes. I want to make use of the each function in my own puppet module to iterate over hiera hashes.

common.yaml

php_ini_settings:
  expose_php: Off
  short_open_tag: On

php.pp

$php_ini_settings = hiera('php_ini_settings')
# Setting php.ini values
if !emtpy($php_ini_settings) {
  each($php_ini_settings) |$key, $value| {
       notify {"$key -- $value": }
}

I changed my puppet.conf (added parser = future in the main/master section) on the master and restarted pe-puppet and pe-http services. After those service restarts I ... (more)

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2014-04-03 07:58:19 -0500

ffrank gravatar image

For simple items such as PHP ini settings, you won't even need create_resources. Try templating a php ini snippet and just generate the appropriate text there.

edit flag offensive delete link more
0

answered 2014-04-01 04:22:01 -0500

doc75 gravatar image

I think that the best way currently is to use create_resources. If you create a defined type, then you pass the hash and it will create all the necessary object for you.

In your case you will have to change slightly the hiera hash format, but it should do the trick.

Hope this helps.

edit flag offensive delete link more

Comments

Thanks for that suggestions! Will try it and let you know

kariboe gravatar imagekariboe ( 2014-04-02 06:43:51 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-03-31 08:01:39 -0500

Seen: 75 times

Last updated: Apr 03 '14