From 24cfb10ce958e1ecaf1eb43efe0efb8590854989 Mon Sep 17 00:00:00 2001 From: Yap Sok Ann Date: Wed, 31 May 2017 22:02:22 +0700 Subject: [PATCH] gce_net: change default to match with b7e78656 for idempotency (#23555) After b7e78656, if `src_range`, `src_tags` or `target_tags` is left as null, the firewall rule would always be recreated. --- lib/ansible/modules/cloud/google/gce_net.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/ansible/modules/cloud/google/gce_net.py b/lib/ansible/modules/cloud/google/gce_net.py index 9ad3ad68e09..d98c6d21719 100644 --- a/lib/ansible/modules/cloud/google/gce_net.py +++ b/lib/ansible/modules/cloud/google/gce_net.py @@ -65,20 +65,20 @@ options: description: - the source IPv4 address range in CIDR notation required: false - default: null + default: [] aliases: ['src_cidr'] src_tags: description: - the source instance tags for creating a firewall rule required: false - default: null + default: [] aliases: [] target_tags: version_added: "1.9" description: - the target instance tags for creating a firewall rule required: false - default: null + default: [] aliases: [] state: description: @@ -325,9 +325,9 @@ def main(): ipv4_range = dict(), fwname = dict(), name = dict(), - src_range = dict(type='list'), - src_tags = dict(type='list'), - target_tags = dict(type='list'), + src_range = dict(default=[], type='list'), + src_tags = dict(default=[], type='list'), + target_tags = dict(default=[], type='list'), state = dict(default='present'), service_account_email = dict(), pem_file = dict(type='path'),