@@ -35,6 +35,7 @@ def cs_argument_spec():
3535 api_http_method = dict (type = 'str' , fallback = (env_fallback , ['CLOUDSTACK_METHOD' ]), choices = ['get' , 'post' ], default = 'get' ),
3636 api_timeout = dict (type = 'int' , fallback = (env_fallback , ['CLOUDSTACK_TIMEOUT' ]), default = 10 ),
3737 api_verify_ssl_cert = dict (type = 'str' , fallback = (env_fallback , ['CLOUDSTACK_VERIFY' ])),
38+ validate_certs = dict (type = 'str' , fallback = (env_fallback , ['CLOUDSTACK_DANGEROUS_NO_TLS_VERIFY' ]), default = True ),
3839 )
3940
4041
@@ -121,13 +122,16 @@ def get_api_config(self):
121122 'timeout' : self .module .params .get ('api_timeout' ),
122123 'method' : self .module .params .get ('api_http_method' ),
123124 'verify' : self .module .params .get ('api_verify_ssl_cert' ),
125+ 'dangerous_no_tls_verify' : self .module .params .get ('validate_certs' ),
124126 }
127+
125128 self .result .update ({
126129 'api_url' : api_config ['endpoint' ],
127130 'api_key' : api_config ['key' ],
128131 'api_timeout' : int (api_config ['timeout' ]),
129132 'api_http_method' : api_config ['method' ],
130133 'api_verify_ssl_cert' : api_config ['verify' ],
134+ 'validate_certs' : api_config ['dangerous_no_tls_verify' ],
131135 })
132136 return api_config
133137
0 commit comments