Ask Your Question
0

Hello Experts, I'm a beginner in puppet and have a scenario to run custom facts based on dynamically generated values from manifest. Is there a way to do this with puppet?

asked 2017-08-21 01:18:32 -0600

I have a scenario to run custom facts based on dynamically generated values from manifest. Is there a way to do this with puppet?

basically I need manifest to be applied based on minimal facts(like os etc) and in this manifest I would try to gather the system state (like list of database instance installed).. and use this list of database, pass them as variable and try to gather custom facts for every database.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-08-21 11:14:51 -0600

DarylW gravatar image

The easiest way to solve your problem is with a two pass puppet run. one pass would create the values in the run as custom facts on the box, and the next run would use the information from those facts to apply what you want. This would required you to always run two sets of puppet runs to converge.

Is there any reason that custom facts couldn't gather the information that you require? We have a similar configuration where we gather information in custom facts from the AWS API to discover things like which RDS instance to use, which other nodes to communicate with, etc, and those custom facts feed our regular puppet run?

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

1 follower

Stats

Asked: 2017-08-21 00:22:44 -0600

Seen: 18 times

Last updated: Aug 21