From 93a2ad437eea239ec94d7b2b9303d36e04450d27 Mon Sep 17 00:00:00 2001 From: The Magician Date: Tue, 4 Dec 2018 11:24:35 -0800 Subject: [PATCH] Conflicts-with (#133) /cc @rambleraptor --- lib/ansible/modules/cloud/google/gcp_compute_firewall.py | 9 ++++++++- .../modules/cloud/google/gcp_compute_health_check.py | 3 ++- lib/ansible/modules/cloud/google/gcp_compute_network.py | 3 ++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/ansible/modules/cloud/google/gcp_compute_firewall.py b/lib/ansible/modules/cloud/google/gcp_compute_firewall.py index d1f75b9bb6c48d..02bafb12a5523b 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_firewall.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_firewall.py @@ -447,7 +447,14 @@ def main(): source_tags=dict(type='list', elements='str'), target_service_accounts=dict(type='list', elements='str'), target_tags=dict(type='list', elements='str') - ) + ), + mutually_exclusive=[['allowed', 'denied'], + ['destination_ranges', 'source_ranges', 'source_tags'], + ['destination_ranges', 'source_ranges'], + ['source_service_accounts', 'source_tags', 'target_tags'], + ['destination_ranges', 'source_service_accounts', 'source_tags', 'target_service_accounts'], + ['source_tags', 'target_service_accounts', 'target_tags'], + ['source_service_accounts', 'target_service_accounts', 'target_tags']] ) if not module.params['scopes']: diff --git a/lib/ansible/modules/cloud/google/gcp_compute_health_check.py b/lib/ansible/modules/cloud/google/gcp_compute_health_check.py index 9e8f2f99e40ef5..f68ed01154fcb7 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_health_check.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_health_check.py @@ -566,7 +566,8 @@ def main(): port_name=dict(type='str'), proxy_header=dict(default='NONE', type='str', choices=['NONE', 'PROXY_V1']) )) - ) + ), + mutually_exclusive=[['http_health_check', 'https_health_check', 'ssl_health_check', 'tcp_health_check']] ) if not module.params['scopes']: diff --git a/lib/ansible/modules/cloud/google/gcp_compute_network.py b/lib/ansible/modules/cloud/google/gcp_compute_network.py index 4a680b64e100f6..ac3907046495c5 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_network.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_network.py @@ -218,7 +218,8 @@ def main(): routing_config=dict(type='dict', options=dict( routing_mode=dict(required=True, type='str', choices=['REGIONAL', 'GLOBAL']) )) - ) + ), + mutually_exclusive=[['auto_create_subnetworks', 'ipv4_range']] ) if not module.params['scopes']: