mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-27 18:50:21 -07:00
[PR #6968/f6714eda backport][stable-7] cmd_runner module utils: fix bug when argument spec has implicit type (#6978)
cmd_runner module utils: fix bug when argument spec has implicit type (#6968)
* cmd_runner module utils: fix bug when argument spec has implicit type
* add changelog frag
(cherry picked from commit f6714edabb
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
0f5f00f41a
commit
7bf155284f
4 changed files with 21 additions and 1 deletions
|
@ -26,6 +26,7 @@ def main():
|
|||
arg_values=dict(type="dict", default={}),
|
||||
check_mode_skip=dict(type="bool", default=False),
|
||||
aa=dict(type="raw"),
|
||||
tt=dict(),
|
||||
),
|
||||
supports_check_mode=True,
|
||||
)
|
||||
|
|
|
@ -121,3 +121,20 @@ cmd_echo_tests:
|
|||
- test_result.rc == None
|
||||
- test_result.out == None
|
||||
- test_result.err == None
|
||||
|
||||
- name: set aa and tt value
|
||||
arg_formats:
|
||||
aa:
|
||||
func: as_opt_eq_val
|
||||
args: [--answer]
|
||||
tt:
|
||||
func: as_opt_val
|
||||
args: [--tt-arg]
|
||||
arg_order: 'aa tt'
|
||||
arg_values:
|
||||
tt: potatoes
|
||||
aa: 11
|
||||
assertions:
|
||||
- test_result.rc == 0
|
||||
- test_result.out == "-- --answer=11 --tt-arg potatoes\n"
|
||||
- test_result.err == ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue