Bug 2137796

Summary: [RFE] provide a way to suppress all output unless there were problems
Product: Red Hat Satellite Reporter: Evgeni Golov <egolov>
Component: Foreman MaintainAssignee: satellite6-bugs <satellite6-bugs>
Status: NEW --- QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.12.0CC: aupadhye, ehelms
Target Milestone: UnspecifiedKeywords: FutureFeature
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Evgeni Golov 2022-10-26 08:47:54 UTC
Description of problem:
When running foreman-maintain via automation, you usually do not want to see all the successful steps. Especially if the "automation" is the good old cron, that sends mail of all the output it gathers.

It is custom to have a cli flag (like --quiet or --batch or --cron) that suppresses all output unless there was an issue. In this case the failing step is printed (sometimes also the successful ones, I don't mind too much either way, whatever is easier to implement).


Version-Release number of selected component (if applicable):
6.12.0 and any other

How reproducible:
100%

Steps to Reproduce:
1. run `foreman-maintain backup online --assumeyes /var/tmp/backup` via cron

Actual results:
you get mail even if the run was successful

Expected results:
no output and thus no mail unless there was an error

Additional info:

Comment 1 Evgeni Golov 2022-10-26 08:58:00 UTC
implementation note: there is already a --quiet command to one of the content commands, I'd be fine renaming that one, but should be considered during implementation