Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to set report_on_exception = false? #36

Closed
iphoting opened this issue Jun 16, 2020 · 2 comments
Closed

Ability to set report_on_exception = false? #36

iphoting opened this issue Jun 16, 2020 · 2 comments

Comments

@iphoting
Copy link

Sometimes, some commands executed on SSH will return an exit status > 0 or output into StdError. In such cases, runbook will throw the SSHKit exception and exits, disallowing the remaining steps to be run.

Is there a way to suppress these known error conditions and continue the runbook execution?
Or is there a way to set report_on_exception = false into the underlying SSHKit config object.

@pblesi
Copy link
Contributor

pblesi commented Jun 16, 2020

The typical pattern for doing this is to append and || true to the end of your shell command. This will prevent the command from returning a non-zero status code. I'm not familiar with report_on_exception, but would be curious to look more into this in the event it provides better functionality than || true

@iphoting
Copy link
Author

Ah, the || true pattern is perfect for my situation. Looks like dealing with report_on_exception is not really necessary, please feel free to close this. 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants