Ask Your Question
0

I only want a puppet class to run if a certtain network route exists on the node. What's the best way to do this?

asked 2016-01-08 08:07:01 -0500

iandelag gravatar image

I've got a puppet class working that installs some software. However, the software only installs properly if a certain route exists so the software client can communicate with the master. I have the network routes being created in a different class in another puppet module. How would I best ensure the routes have been created before installing the software?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-01-09 19:50:59 -0500

Sarsa-JP gravatar image

updated 2016-01-09 20:35:05 -0500

I'd approach it in 2 ways. You can create or search for a fact facter that returns the routes available in the system and then, in the class that installs the software you may use some if statements to decide whether you can install it or not.

If you are willing to create a dependency on the install module, you can also call the route creation module from inside of it. Just need to confirm if it is a good practice.

I think that using the fact would be the best choice.

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: 2016-01-08 08:07:01 -0500

Seen: 158 times

Last updated: Jan 09 '16