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

run.rb: Fail when the puppet agent run fails #741

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tasks/run.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,10 @@ def try_run(last_run_report, params)
command = [puppet_bin, 'agent', '-t', '--color', 'false', noop(params), environment(params)]

options = {
failonfail: false,
failonfail: true, # fail the task when the puppet agent run fails
custom_environment: get_env_fix_up,
override_locale: false
override_locale: false,
combine: true # combine stdout and stderr
}

run_result = Puppet::Util::Execution.execute(command.reject(&:empty?), options)
Expand Down
Loading