-
Notifications
You must be signed in to change notification settings - Fork 23.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
command: Remove executable parameter when using command #23062
Conversation
@nitzmahone @jimi-c @bcoca Is this implementation acceptable ? |
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.
Looks good to me- I don't think returning an empty warnings collection is a problem, but others might disagree.
@nitzmahone The empty warnings was not a concern to me, I simply wanted to make use of the new module.warn() infrastructure. More examples of it in use may help people do the right thing :-) @bcoca So what needs to happen to get this going ? |
2639b13
to
01c37c2
Compare
@@ -157,6 +141,10 @@ def main(): | |||
removes = module.params['removes'] | |||
warn = module.params['warn'] | |||
|
|||
if not shell and executable: | |||
module.warn('The parameter "executable" is not supported with the "command" module. Not using "%s".' % executable) |
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.
Maybe add the version executable went away:
module.warn('As of Ansible 2.4, the parameter "executable" is no longer supported with the "command" module. Not using "%s".' % executable)
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.
Changed. Thanks !
00cecef
to
5094b33
Compare
This was discussed with the core team and removing this option was preferred. For backward compatibility we accept the parameter, but warn the user instead.
5094b33
to
201d719
Compare
merged to devel. Thanks dag! |
SUMMARY
This was discussed with the core team and removing this option was preferred.
For backward compatibility we accept the parameter, but warn the user instead.
This PR also includes a change related to warnings, we now use the warning-infrastructure, this avoids empty warnings-dictionary in the output if there's no warning.
ISSUE TYPE
COMPONENT NAME
command
ANSIBLE VERSION
v2.4