Ansible launcher: some ansible fixes
These were causing ansible errors: * required and default are mutually exclusize * don't return rc from the zuul_log module * the initial timeout, if not set, will arrive as the string 'None' Change-Id: I0129c01d5fb365b81812553eeaf6b3d91acf8f55
This commit is contained in:
parent
fc47fec61d
commit
7ab2be381b
|
@ -41,13 +41,13 @@ def log(msg):
|
|||
def main():
|
||||
module = AnsibleModule(
|
||||
argument_spec=dict(
|
||||
msg=dict(required=True, default=''),
|
||||
msg=dict(required=True),
|
||||
)
|
||||
)
|
||||
|
||||
p = module.params
|
||||
ret = log(p['msg'])
|
||||
module.exit_json(changed=True, rc=ret)
|
||||
log(p['msg'])
|
||||
module.exit_json(changed=True)
|
||||
|
||||
from ansible.module_utils.basic import * # noqa
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ class CallbackModule(CallbackBase):
|
|||
facts = dict(elapsed_time=self._elapsed_time)
|
||||
|
||||
overall_timeout = manager.extra_vars.get('timeout')
|
||||
if overall_timeout is not None:
|
||||
if str(overall_timeout) != 'None':
|
||||
timeout = int(overall_timeout) - int(self._elapsed_time)
|
||||
facts['timeout'] = timeout
|
||||
|
||||
|
|
Loading…
Reference in New Issue