Bugfix for idempotency bug (#41889)

- Comparison was not happening properly as it lacked full data
- Module now creates a full data structure on payload
- Defaults to America/Los_Angeles as that's what Meraki seems to do
pull/41811/head
Kevin Breit 7 years ago committed by Dag Wieers
parent b84adfd885
commit 44e9ea30c9

@ -184,11 +184,14 @@ def main():
if meraki.params['state'] == 'present': if meraki.params['state'] == 'present':
payload = {'name': meraki.params['net_name'], payload = {'name': meraki.params['net_name'],
'type': meraki.params['type'], 'type': meraki.params['type'],
'tags': meraki.params['tags'],
} }
if meraki.params['tags']: if meraki.params['tags']:
payload['tags'] = construct_tags(meraki.params['tags']) payload['tags'] = construct_tags(meraki.params['tags'])
if meraki.params['timezone']: if meraki.params['timezone']:
payload['timeZone'] = meraki.params['timezone'] payload['timeZone'] = meraki.params['timezone']
else:
payload['timeZone'] = 'America/Los_Angeles'
if meraki.params['type'] == 'combined': if meraki.params['type'] == 'combined':
payload['type'] = 'switch wireless appliance' payload['type'] = 'switch wireless appliance'

Loading…
Cancel
Save