-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
feat(ansible): make ansible verbosity configurable #2087
Conversation
This is the last part of the work broken up from #1852 |
7aba14c
to
3d57784
Compare
type cmdFuncType func(ident, inputDirPath string, maxArtifacts int) *exec.Cmd | ||
|
||
func playbookCmdFunc(verbosity, path string) cmdFuncType { | ||
return func(ident, inputDirPath string, maxArtifacts int) *exec.Cmd { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be worth creating an issue to make it possible to configure the ansibleVerbosity
via an annotation on the Custom Resource. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that idea a lot actually
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
@camilamacedo86 @jmrodri You both had a look at #1852 . This is the last PR broken up from that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Request 1 minor change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor comment changes, otherwise looks good.
doc/ansible/dev/advanced_options.md
Outdated
|
||
Setting the verbosity at which `ansible-runner` is run controls how verbose the | ||
output of `ansible-playbook` will be. The normal rules for verbosity apply here | ||
where higher values means more verbose output. Acceptable values range from 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tense: I think it should read "higher values mean more"
Updates made. Let me know if I missed anything. |
Make it possible to configure the verbosity of `ansible-runner` command invocations via command line flags. The default value should be 2 to avoid unexpected changes in behavior. Also, like `maxWorkers` the `ansibleVerbosity` can be overridden per GVK with an environment variable of the form `ANSIBLE_VERBOSITY_$KIND_$GROUP`. This PR: - Adds new command line flag `ansible-verbosity` for Ansible based operators - Add internal `cmdFuncType` to runner pkg for use when constructing command functions
- word choice in advanced_options - refer to correct environment key in getAnsibleVerbosity()
dc1f71c
to
8e2b696
Compare
Rebased and updated the changelog entry to put this with the unreleased. |
/retest |
/lgtm |
/retest |
/retest |
/retest |
/test e2e-aws-go |
Make it possible to configure the verbosity of
ansible-runner
commandinvocations via command line flags. The default value should be 2 to
avoid unexpected changes in behavior. Also, like
maxWorkers
theansibleVerbosity
can be overridden per GVK with an environmentvariable of the form
ANSIBLE_VERBOSITY_$KIND_$GROUP
.This PR:
ansible-verbosity
for Ansible basedoperators
cmdFuncType
to runner pkg for use when constructingcommand functions