From 44e9ea30c9fb37129a14d324168a5c45affa5fe7 Mon Sep 17 00:00:00 2001 From: Kevin Breit Date: Mon, 25 Jun 2018 07:46:21 -0500 Subject: [PATCH] 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 --- lib/ansible/modules/network/meraki/meraki_network.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ansible/modules/network/meraki/meraki_network.py b/lib/ansible/modules/network/meraki/meraki_network.py index 88afabeabe5..60f69dcbf02 100644 --- a/lib/ansible/modules/network/meraki/meraki_network.py +++ b/lib/ansible/modules/network/meraki/meraki_network.py @@ -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'