Merge branch 'BANS-425' into 'rc-5.2.6'

Fix check mode logic for RG creating in decort_rg module

See merge request rudecs/dev/decort-ansible!82
This commit is contained in:
2024-06-17 13:54:58 +00:00

View File

@@ -324,11 +324,14 @@ class decort_rg(DecortController):
"", # this is location code. TODO: add module argument
)
self.validated_rg_id, self.rg_facts = self.rg_find(self.validated_acc_id,
self.validated_rg_id,
arg_rg_name="",
arg_check_state=False)
self.rg_should_exist = True
if self.validated_rg_id:
self.validated_rg_id, self.rg_facts = self.rg_find(
arg_account_id=self.validated_acc_id,
arg_rg_id=self.validated_rg_id,
arg_rg_name="",
arg_check_state=False
)
self.rg_should_exist = True
return
def enable(self):
@@ -515,7 +518,7 @@ def main():
)
else:
decon.create()
if amodule.params['access']:
if amodule.params['access'] and not amodule.check_mode:
decon.access()
elif amodule.params['state'] in ('disabled'):
decon.error()