mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-22 22:11:44 -07:00
Switch parameters validation after parsing in order to be more consistent between old and new style.
This commit is contained in:
parent
31d06886d5
commit
2c54fb1339
2 changed files with 8 additions and 6 deletions
|
@ -83,11 +83,6 @@ def parse_kv(args, check_raw=False):
|
|||
k = x[:pos]
|
||||
v = x[pos + 1:]
|
||||
|
||||
# only internal variables can start with an underscore, so
|
||||
# we don't allow users to set them directy in arguments
|
||||
if k.startswith('_'):
|
||||
raise AnsibleError("invalid parameter specified: '%s'" % k)
|
||||
|
||||
# FIXME: make the retrieval of this list of shell/command
|
||||
# options a function, so the list is centralized
|
||||
if check_raw and k not in ('creates', 'removes', 'chdir', 'executable', 'warn'):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue