ACI: Make network testing work out-of-the-box (#35116)
This commit is contained in:
parent
064aad817d
commit
2cd8a3a9a3
3 changed files with 11 additions and 2 deletions
|
@ -189,9 +189,9 @@ class ACIModule(object):
|
||||||
''' Set protocol based on use_ssl parameter '''
|
''' Set protocol based on use_ssl parameter '''
|
||||||
|
|
||||||
# Set protocol for further use
|
# Set protocol for further use
|
||||||
if self.params['protocol'] in ('http', 'https'):
|
if 'protocol' in self.params and self.params['protocol'] in ('http', 'https'):
|
||||||
self.module.deprecate("Parameter 'protocol' is deprecated, please use 'use_ssl' instead.", '2.6')
|
self.module.deprecate("Parameter 'protocol' is deprecated, please use 'use_ssl' instead.", '2.6')
|
||||||
elif self.params['protocol'] is None:
|
elif 'protocol' not in self.params or self.params['protocol'] is None:
|
||||||
self.params['protocol'] = 'https' if self.params.get('use_ssl', True) else 'http'
|
self.params['protocol'] = 'https' if self.params.get('use_ssl', True) else 'http'
|
||||||
else:
|
else:
|
||||||
self.module.fail_json(msg="Parameter 'protocol' needs to be one of ( http, https )")
|
self.module.fail_json(msg="Parameter 'protocol' needs to be one of ( http, https )")
|
||||||
|
|
|
@ -48,6 +48,14 @@ groups_tree_var=3000
|
||||||
grandparent_var=2000
|
grandparent_var=2000
|
||||||
overridden_in_parent=2000
|
overridden_in_parent=2000
|
||||||
|
|
||||||
|
[aci:vars]
|
||||||
|
aci_hostname=your-apic-1
|
||||||
|
aci_username=admin
|
||||||
|
aci_password=your-password
|
||||||
|
|
||||||
|
[aci]
|
||||||
|
localhost ansible_ssh_host=127.0.0.1 ansible_connection=local
|
||||||
|
|
||||||
[amazon]
|
[amazon]
|
||||||
localhost ansible_ssh_host=127.0.0.1 ansible_connection=local
|
localhost ansible_ssh_host=127.0.0.1 ansible_connection=local
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
a10
|
a10
|
||||||
|
aci
|
||||||
asa
|
asa
|
||||||
bigip
|
bigip
|
||||||
cl
|
cl
|
||||||
|
|
Loading…
Reference in a new issue