Ask Your Question
0

exec from forge module returns 1

asked 2017-04-07 11:15:13 -0500

I am using a forge module that returns 1 as the return code and puppet throws an error about it.

But for that exec , 1 should be treated as successful.

I cannot add returns 1 on the exec because it is inside a forge module and is not in my module code.

How do i handle this? The module owner has to fix their code to let 1 as successful or is there a way around?

Many thanks in advance!

edit retag flag offensive close merge delete

Comments

Which Forge module are you referring to?

natemccurdy gravatar imagenatemccurdy ( 2017-04-11 23:25:24 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-04-10 09:09:36 -0500

DarylW gravatar image

There isn't a good/clean way to fix the problem. Either you submit a pull request to the maintainer of the module, or you create your own fork (local or otherwise). There isn't a reasonable way to subclass and override in puppet code.

Typically, a return code of 1 should be an error. Some modules have options to pass in additional parameters for execs (I believe the staging module has an argument where you can pass additional flags in, and adding things like an --overwrite flag to a tar file allows it's behavior to act gracefully and not return a 1 in some cases.

What module, and what exec?

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-04-07 11:15:13 -0500

Seen: 18 times

Last updated: Apr 10