1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

fix modules' output by using publish_cmd (#3655)

* fix modules' output by using publish_cmd

* added changelog frag

* Update changelogs/fragments/3655-use-publish_cmd.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update changelogs/fragments/3655-use-publish_cmd.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update changelogs/fragments/3655-use-publish_cmd.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Alexei Znamensky 2021-11-02 01:53:02 +13:00 committed by GitHub
parent 01887bf359
commit 9eb638f651
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 3 deletions

View file

@ -0,0 +1,4 @@
bugfixes:
- ansible_galaxy_install - the output value ``cmd_args`` was bringing the intermediate command used to gather the state, instead of the command that actually performed the state change (https://github.com/ansible-collections/community.general/pull/3655).
- pipx - the output value ``cmd_args`` was bringing the intermediate command used to gather the state, instead of the command that actually performed the state change (https://github.com/ansible-collections/community.general/pull/3655).
- snap_alias - the output value ``cmd_args`` was bringing the intermediate command used to gather the state, instead of the command that actually performed the state change (https://github.com/ansible-collections/community.general/pull/3655).

View file

@ -238,7 +238,7 @@ class AnsibleGalaxyInstall(CmdModuleHelper):
def _list_element(self, _type, path_re, elem_re):
params = ({'type': _type}, {'galaxy_cmd': 'list'}, 'dest')
elems = self.run_command(params=params,
publish_rc=False, publish_out=False, publish_err=False,
publish_rc=False, publish_out=False, publish_err=False, publish_cmd=False,
process_output=self._process_output_list,
check_rc=False)
elems_dict = {}

View file

@ -197,7 +197,7 @@ class PipX(CmdStateModuleHelper):
return results
installed = self.run_command(params=[{'_list': True}], process_output=process_list,
publish_rc=False, publish_out=False, publish_err=False)
publish_rc=False, publish_out=False, publish_err=False, publish_cmd=False)
if self.vars.name is not None:
app_list = installed.get(self.vars.name)

View file

@ -134,7 +134,7 @@ class SnapAlias(CmdStateModuleHelper):
return results
return self.run_command(params=[{'state': 'info'}, 'name'], check_rc=True,
publish_rc=False, publish_out=False, publish_err=False,
publish_rc=False, publish_out=False, publish_err=False, publish_cmd=False,
process_output=process_get_aliases)
def _get_aliases_for(self, name):