mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 19:31:26 -07:00
Ansible.Basic.cs - fix check mode run with nested spec (#48838)
This commit is contained in:
parent
a41c0405a7
commit
fd4b282f6f
2 changed files with 24 additions and 1 deletions
|
@ -700,7 +700,8 @@ namespace Ansible.Basic
|
|||
// initially parse the params and check for unsupported ones and set internal vars
|
||||
CheckUnsupportedArguments(param, legalInputs);
|
||||
|
||||
if (CheckMode && !(bool)spec["supports_check_mode"])
|
||||
// Only run this check if we are at the root argument (optionsContext.Count == 0)
|
||||
if (CheckMode && !(bool)spec["supports_check_mode"] && optionsContext.Count == 0)
|
||||
{
|
||||
Result["skipped"] = true;
|
||||
Result["msg"] = String.Format("remote module ({0}) does not support check mode", ModuleName);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue