cloudstack: cs_instance: use mutually_exlusive of AnsibleModule
This commit is contained in:
parent
f4f20c7c20
commit
88488c26ef
1 changed files with 3 additions and 3 deletions
|
@ -402,9 +402,6 @@ class AnsibleCloudStackInstance(AnsibleCloudStack):
|
|||
if not template and not iso:
|
||||
self.module.fail_json(msg="Template or ISO is required.")
|
||||
|
||||
if template and iso:
|
||||
self.module.fail_json(msg="Template are ISO are mutually exclusive.")
|
||||
|
||||
args = {}
|
||||
args['account'] = self.get_account(key='name')
|
||||
args['domainid'] = self.get_domain(key='id')
|
||||
|
@ -853,6 +850,9 @@ def main():
|
|||
api_http_method = dict(choices=['get', 'post'], default='get'),
|
||||
api_timeout = dict(type='int', default=10),
|
||||
),
|
||||
mutually_exclusive = (
|
||||
['template', 'iso'],
|
||||
),
|
||||
required_together = (
|
||||
['api_key', 'api_secret', 'api_url'],
|
||||
),
|
||||
|
|
Loading…
Reference in a new issue