Ask Your Question
0

Does puppet offers enumeration?

asked 2014-11-03 15:14:25 -0500

jaksky gravatar image

Hi,

I am using puppet 3.7 and I would like to provide a setting of log level with values: DEBUG, INFO, WARN, ERROR. Those would be best modeled with enumeration data type. Does puppet offer something like that?

Was googling and found various error report but not clear about the usage and syntax etc. Some clarification would be awesome.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-11-04 07:54:14 -0500

llowder gravatar image

In the current DSL, no. The closest thing is you can pass an array into a resource and then create an instance of that resource with each element of the array as the title of the resource.

However, you can create custom functions to do enumeration and there IS enumeration available if you enable the experimental future parser.

edit flag offensive delete link more

Comments

Puppet 4 has been released and includes the 'future' parser as the new default. In other words, enumerable are now available.

Martijn Heemels gravatar imageMartijn Heemels ( 2015-05-18 04:23:45 -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-11-03 15:14:25 -0500

Seen: 66 times

Last updated: Nov 04 '14