bigip_monitor_http: two small bug fixes

- extra properties were not set at creation, only when updating
  which can be overlooked when running the module from more than 1 node...
- fix bas var as time_until_up didn't get used
This commit is contained in:
Serge van Ginderachter 2013-12-17 21:48:29 +01:00
parent 320d41149a
commit ad6ffe00d0

View file

@ -394,7 +394,7 @@ def main():
{'type': 'ITYPE_TIMEOUT', {'type': 'ITYPE_TIMEOUT',
'value': timeout}, 'value': timeout},
{'type': 'ITYPE_TIME_UNTIL_UP', {'type': 'ITYPE_TIME_UNTIL_UP',
'value': interval}] 'value': time_until_up}]
# main logic, monitor generic # main logic, monitor generic
@ -425,11 +425,9 @@ def main():
# whether it already existed, or was just created, now update # whether it already existed, or was just created, now update
# the update functions need to check for check mode but # the update functions need to check for check mode but
# cannot update settings if it doesn't exist which happens in check mode # cannot update settings if it doesn't exist which happens in check mode
if monitor_exists and not module.check_mode: result['changed'] |= update_monitor_properties(api, module, monitor,
result['changed'] |= update_monitor_properties(api, module, monitor, template_string_properties,
template_string_properties, template_integer_properties)
template_integer_properties)
# else assume nothing changed
# we just have to update the ipport if monitor already exists and it's different # we just have to update the ipport if monitor already exists and it's different
if monitor_exists and cur_ipport != ipport: if monitor_exists and cur_ipport != ipport: