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
This commit is contained in:
Kevin Breit 2018-06-25 07:46:21 -05:00 committed by Dag Wieers
parent b84adfd885
commit 44e9ea30c9

View file

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