Ask Your Question

How to run a command in spite of failed dependencies

asked 2015-07-29 15:26:15 -0600

kartikv gravatar image


I need to execute something in spite of failed dependencies in my manifests, how do I do this. Thanks as always.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2015-07-29 17:10:15 -0600

GregLarkin gravatar image

The only way you can do that is by removing any dependencies between the resources, e.g. attributes or chaining arrows.

However, the better question is: why do you want to do this, and under what circumstances? If resource A truly requires resource B, then how can you apply resource A if resource B fails? If it doesn't matter, then there's no dependency between those resources.

edit flag offensive delete link more


I am starting a service. For some reason, it does not automatically start after a puppet run....I need to run the command manually. I am hoping that if I put down another statement in the .pp file which starts it again, it'll all work fine

kartikv gravatar imagekartikv ( 2015-07-30 17:00:38 -0600 )edit

Have a look at the service resource type: That's what you need to use to start a service. If the service doesn't depend on anything else on your system, you don't need to create dependencies on it. NB: If you can't start the service by

GregLarkin gravatar imageGregLarkin ( 2015-07-31 00:24:28 -0600 )edit

...hand, then Puppet won't be able to either.

GregLarkin gravatar imageGregLarkin ( 2015-07-31 00:24:46 -0600 )edit

answered 2015-07-30 04:27:54 -0600

what Greg said . .. but just to add to it - the puppet DSL isn't about running a set of commands per se but about defining the end state you want to achieve - so from that point of view you need to specify dependencies (or none - as it appears in this case)

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


Asked: 2015-07-29 15:26:15 -0600

Seen: 133 times

Last updated: Jul 30 '15