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:
parent
01887bf359
commit
9eb638f651
4 changed files with 7 additions and 3 deletions
4
changelogs/fragments/3655-use-publish_cmd.yaml
Normal file
4
changelogs/fragments/3655-use-publish_cmd.yaml
Normal 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).
|
|
@ -238,7 +238,7 @@ class AnsibleGalaxyInstall(CmdModuleHelper):
|
||||||
def _list_element(self, _type, path_re, elem_re):
|
def _list_element(self, _type, path_re, elem_re):
|
||||||
params = ({'type': _type}, {'galaxy_cmd': 'list'}, 'dest')
|
params = ({'type': _type}, {'galaxy_cmd': 'list'}, 'dest')
|
||||||
elems = self.run_command(params=params,
|
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,
|
process_output=self._process_output_list,
|
||||||
check_rc=False)
|
check_rc=False)
|
||||||
elems_dict = {}
|
elems_dict = {}
|
||||||
|
|
|
@ -197,7 +197,7 @@ class PipX(CmdStateModuleHelper):
|
||||||
return results
|
return results
|
||||||
|
|
||||||
installed = self.run_command(params=[{'_list': True}], process_output=process_list,
|
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:
|
if self.vars.name is not None:
|
||||||
app_list = installed.get(self.vars.name)
|
app_list = installed.get(self.vars.name)
|
||||||
|
|
|
@ -134,7 +134,7 @@ class SnapAlias(CmdStateModuleHelper):
|
||||||
return results
|
return results
|
||||||
|
|
||||||
return self.run_command(params=[{'state': 'info'}, 'name'], check_rc=True,
|
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)
|
process_output=process_get_aliases)
|
||||||
|
|
||||||
def _get_aliases_for(self, name):
|
def _get_aliases_for(self, name):
|
||||||
|
|
Loading…
Reference in a new issue