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
rc-5.3.0^2
commit 309d5b91eb

@ -324,10 +324,13 @@ class decort_rg(DecortController):
"", # this is location code. TODO: add module argument "", # this is location code. TODO: add module argument
) )
self.validated_rg_id, self.rg_facts = self.rg_find(self.validated_acc_id, if self.validated_rg_id:
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_rg_name="",
arg_check_state=False) arg_check_state=False
)
self.rg_should_exist = True self.rg_should_exist = True
return return
@ -515,7 +518,7 @@ def main():
) )
else: else:
decon.create() decon.create()
if amodule.params['access']: if amodule.params['access'] and not amodule.check_mode:
decon.access() decon.access()
elif amodule.params['state'] in ('disabled'): elif amodule.params['state'] in ('disabled'):
decon.error() decon.error()

Loading…
Cancel
Save