Ask Your Question

generic settings for all specific settings for individual

asked 2015-02-24 12:52:36 -0600

Gintas gravatar image


what is the best practice to apply general settings for all nodes + specific settings for each node? I would expect to achieve such behaviour in a similar way as the following:

#I know that this code does not behave as specified in the comments
#Apply these settings on all nodes, including nodes xx.xx.xx.xx and yy.yy.yy.yy 
node * {   

#ADDITIONALLY apply specific settings for the specific node node xx.xx.xx.xx 

#ADDITIONALLY apply specific settings for the specific node node yy.yy.yy.yy 

One workaround I can come up with is to create a module GenericConfModule and use it in all nodes explicitly. However, this still involves some repetition such as "include GenericConfModule".

Cheers, Gin

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2015-02-24 22:17:30 -0600

GregLarkin gravatar image

I think you would benefit greatly from watching Craig Dunn's excellent presentation about roles and profiles found here:

With well-defined role and profile modules, combined with lookups in a Hiera hierarchical database, you will be able to achieve exactly what you're trying to do with your data and code separated and one business role assigned per node.

Hope that helps!

edit flag offensive delete link more

answered 2015-02-25 06:31:12 -0600

Gintas gravatar image

Thanks Greg. Your patience and input is much appreciated!

edit flag offensive delete link more


Glad to help - cheers!

GregLarkin gravatar imageGregLarkin ( 2015-02-25 09:48:27 -0600 )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


Asked: 2015-02-24 12:52:36 -0600

Seen: 32 times

Last updated: Feb 25 '15