This commit is contained in:
SebClem 2024-09-16 19:12:32 +02:00
parent 588defc0aa
commit b06d4143da
Signed by: sebclem
GPG Key ID: 5A4308F6A359EA50

View File

@ -42,6 +42,9 @@ class ActionModule(ActionBase):
raise AnsibleError('\'dir\' option is mendatory in load_hasites_config')
if not "default_domain" in module_args:
raise AnsibleError('\'default_domain\' option is mendatory in load_hasites_config')
if not "target" in module_args:
raise AnsibleError('\'target\' option is mendatory in load_hasites_config')
self.source_dir = module_args.get('dir')
self.default_domain = module_args.get('default_domain')
@ -68,7 +71,12 @@ class ActionModule(ActionBase):
break
results['sites'] = results['sites'] + updated_results['sites']
result = {
"relay_conf": {
"sites": result["site"],
"target": module_args['target']
}
}
result = super(ActionModule, self).run(task_vars=task_vars)
if failed: