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

Move execution of getConfig before if-condition of check mode in decort_k8s.package_facts method

See merge request rudecs/dev/decort-ansible!30
This commit is contained in:
Алексей Даньков
2024-05-21 14:59:44 +00:00

View File

@@ -153,6 +153,9 @@ class decort_k8s(DecortController):
config=None,
)
if self.amodule.params['getConfig'] and self.k8s_info['techStatus'] == "STARTED":
ret_dict['config'] = self.k8s_getConfig()
if check_mode:
# in check mode return immediately with the default values
return ret_dict
@@ -172,9 +175,6 @@ class decort_k8s(DecortController):
ret_dict['k8s_Masters'] = self.k8s_info['k8sGroups']['masters']
ret_dict['k8s_Workers'] = self.k8s_info['k8sGroups']['workers']
if self.amodule.params['getConfig'] and self.k8s_info['techStatus'] == "STARTED":
ret_dict['config'] = self.k8s_getConfig()
return ret_dict
def nop(self):