diff --git a/lib/ansible/modules/extras/cloud/cloudstack/cs_account.py b/lib/ansible/modules/extras/cloud/cloudstack/cs_account.py index 399dfa090cc..a8510bbc5b3 100644 --- a/lib/ansible/modules/extras/cloud/cloudstack/cs_account.py +++ b/lib/ansible/modules/extras/cloud/cloudstack/cs_account.py @@ -369,6 +369,9 @@ def main(): api_url = dict(default=None), api_http_method = dict(default='get'), ), + required_together = ( + ['api_key', 'api_secret', 'api_url'], + ), supports_check_mode=True ) diff --git a/lib/ansible/modules/extras/cloud/cloudstack/cs_affinitygroup.py b/lib/ansible/modules/extras/cloud/cloudstack/cs_affinitygroup.py index 5330c46e1d9..76e3c8b3701 100644 --- a/lib/ansible/modules/extras/cloud/cloudstack/cs_affinitygroup.py +++ b/lib/ansible/modules/extras/cloud/cloudstack/cs_affinitygroup.py @@ -222,6 +222,9 @@ def main(): api_url = dict(default=None), api_http_method = dict(default='get'), ), + required_together = ( + ['api_key', 'api_secret', 'api_url'], + ), supports_check_mode=True ) diff --git a/lib/ansible/modules/extras/cloud/cloudstack/cs_firewall.py b/lib/ansible/modules/extras/cloud/cloudstack/cs_firewall.py index e1e0f4a503d..d9c7a7f9c39 100644 --- a/lib/ansible/modules/extras/cloud/cloudstack/cs_firewall.py +++ b/lib/ansible/modules/extras/cloud/cloudstack/cs_firewall.py @@ -421,6 +421,13 @@ def main(): api_url = dict(default=None), api_http_method = dict(default='get'), ), + required_one_of = ( + ['ip_address', 'network'], + ), + required_together = ( + ['icmp_type', 'icmp_code'], + ['api_key', 'api_secret', 'api_url'], + ), mutually_exclusive = ( ['icmp_type', 'start_port'], ['icmp_type', 'end_port'], diff --git a/lib/ansible/modules/extras/cloud/cloudstack/cs_instance.py b/lib/ansible/modules/extras/cloud/cloudstack/cs_instance.py index 7aa1bedde4e..1a94b2f6855 100644 --- a/lib/ansible/modules/extras/cloud/cloudstack/cs_instance.py +++ b/lib/ansible/modules/extras/cloud/cloudstack/cs_instance.py @@ -788,6 +788,9 @@ def main(): api_url = dict(default=None), api_http_method = dict(default='get'), ), + required_together = ( + ['api_key', 'api_secret', 'api_url'], + ), supports_check_mode=True ) diff --git a/lib/ansible/modules/extras/cloud/cloudstack/cs_instancegroup.py b/lib/ansible/modules/extras/cloud/cloudstack/cs_instancegroup.py index d62004cc94f..9041e351539 100644 --- a/lib/ansible/modules/extras/cloud/cloudstack/cs_instancegroup.py +++ b/lib/ansible/modules/extras/cloud/cloudstack/cs_instancegroup.py @@ -200,6 +200,9 @@ def main(): api_url = dict(default=None), api_http_method = dict(default='get'), ), + required_together = ( + ['api_key', 'api_secret', 'api_url'], + ), supports_check_mode=True ) diff --git a/lib/ansible/modules/extras/cloud/cloudstack/cs_iso.py b/lib/ansible/modules/extras/cloud/cloudstack/cs_iso.py index 85cc27d6495..61f7a82327f 100644 --- a/lib/ansible/modules/extras/cloud/cloudstack/cs_iso.py +++ b/lib/ansible/modules/extras/cloud/cloudstack/cs_iso.py @@ -332,6 +332,9 @@ def main(): api_url = dict(default=None), api_http_method = dict(default='get'), ), + required_together = ( + ['api_key', 'api_secret', 'api_url'], + ), supports_check_mode=True ) diff --git a/lib/ansible/modules/extras/cloud/cloudstack/cs_portforward.py b/lib/ansible/modules/extras/cloud/cloudstack/cs_portforward.py index ffb552fa74d..9c181c55772 100644 --- a/lib/ansible/modules/extras/cloud/cloudstack/cs_portforward.py +++ b/lib/ansible/modules/extras/cloud/cloudstack/cs_portforward.py @@ -407,6 +407,9 @@ def main(): api_url = dict(default=None), api_http_method = dict(default='get'), ), + required_together = ( + ['api_key', 'api_secret', 'api_url'], + ), supports_check_mode=True ) diff --git a/lib/ansible/modules/extras/cloud/cloudstack/cs_securitygroup.py b/lib/ansible/modules/extras/cloud/cloudstack/cs_securitygroup.py index 02125e5b3aa..3b6d74bad61 100644 --- a/lib/ansible/modules/extras/cloud/cloudstack/cs_securitygroup.py +++ b/lib/ansible/modules/extras/cloud/cloudstack/cs_securitygroup.py @@ -165,6 +165,9 @@ def main(): api_url = dict(default=None), api_http_method = dict(default='get'), ), + required_together = ( + ['api_key', 'api_secret', 'api_url'], + ), supports_check_mode=True ) diff --git a/lib/ansible/modules/extras/cloud/cloudstack/cs_securitygroup_rule.py b/lib/ansible/modules/extras/cloud/cloudstack/cs_securitygroup_rule.py index 03e4fccc033..afe2cc3c914 100644 --- a/lib/ansible/modules/extras/cloud/cloudstack/cs_securitygroup_rule.py +++ b/lib/ansible/modules/extras/cloud/cloudstack/cs_securitygroup_rule.py @@ -401,6 +401,10 @@ def main(): api_url = dict(default=None), api_http_method = dict(default='get'), ), + required_together = ( + ['icmp_type', 'icmp_code'], + ['api_key', 'api_secret', 'api_url'], + ), mutually_exclusive = ( ['icmp_type', 'start_port'], ['icmp_type', 'end_port'], diff --git a/lib/ansible/modules/extras/cloud/cloudstack/cs_sshkeypair.py b/lib/ansible/modules/extras/cloud/cloudstack/cs_sshkeypair.py index 0d2e2c822f1..e7ee88e3bea 100644 --- a/lib/ansible/modules/extras/cloud/cloudstack/cs_sshkeypair.py +++ b/lib/ansible/modules/extras/cloud/cloudstack/cs_sshkeypair.py @@ -219,6 +219,9 @@ def main(): api_url = dict(default=None), api_http_method = dict(default='get'), ), + required_together = ( + ['api_key', 'api_secret', 'api_url'], + ), supports_check_mode=True ) diff --git a/lib/ansible/modules/extras/cloud/cloudstack/cs_vmsnapshot.py b/lib/ansible/modules/extras/cloud/cloudstack/cs_vmsnapshot.py index e46c6e2a1d6..f157873ce06 100644 --- a/lib/ansible/modules/extras/cloud/cloudstack/cs_vmsnapshot.py +++ b/lib/ansible/modules/extras/cloud/cloudstack/cs_vmsnapshot.py @@ -291,6 +291,10 @@ def main(): api_url = dict(default=None), api_http_method = dict(default='get'), ), + required_together = ( + ['icmp_type', 'icmp_code'], + ['api_key', 'api_secret', 'api_url'], + ), supports_check_mode=True )