Ask Your Question
0

pe_console parameter array (ntp module servers parameter)

asked 2013-07-23 19:34:35 -0500

waydenie gravatar image

Hello,

I've installed the puppetlabs/ntp module in PE3 and added its class to the default group. I would like to set two servers directives, but can't seem to set them. Using a comma separate list, or a square braced list do not seem to work. Neither does setting multiple 'servers' parameters (only the last one is kept).

How do we set an array of values for a class parameter in PE3? Specifically, when using the puppetlabs/ntp module how do you set multiple servers?

Thanks,

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2013-07-23 20:53:32 -0500

GregLarkin gravatar image

updated 2013-07-26 10:27:32 -0500

Did you try something like this and it didn't work?

class { '::ntp':
  servers => [ 'ntp1.corp.com', 'ntp2.corp.com' ],
}

If you would, please post your code for further review and troubleshooting, and I'm sure someone here can get you up and running.

Bummer - the Puppet docs found here say:

Note: Class parameters can only be strings. The PE console does not support setting arrays, hashes, or booleans as parameters.

Seems like that ought to be an enhancement request in the Puppet issue tracker. I'll check there to see if one exists already.


I haven't found an ... (more)

edit flag offensive delete link more

Comments

I'm using the web console in Puppet Enterprise 3, so I'm not writing the class files myself, directly... Where does PE3 Webconsole write the code? I don't ...(more)

waydenie gravatar imagewaydenie ( 2013-07-23 21:48:13 -0500 )edit
0

answered 2013-07-26 19:44:43 -0500

waydenie gravatar image

updated 2013-07-26 19:45:39 -0500

Hi, thanks for the suggestion, I'll give it a try on my test setup. I wonder what Puppetlabs plans are for a full fix... Sounds like a pretty basic omission... I'm just waiting for our license purchase to go through, and I'll ask support about it.

I have also found another way to get it to work (not from within Console, but still maintaining config separate from code/modules). I configured Hiera (basically just created the Hiera data directory, which was missing, and restarted puppet). Then I wrote the module parameters to the default.yaml file, then ... (more)

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2013-07-23 19:34:35 -0500

Seen: 879 times

Last updated: Jul 26 '13