@@ -35,6 +35,7 @@ def cs_argument_spec():
3535 api_http_method = dict (choices = ['get' , 'post' ], default = os .environ .get ('CLOUDSTACK_METHOD' )),
3636 api_timeout = dict (type = 'int' , default = os .environ .get ('CLOUDSTACK_TIMEOUT' )),
3737 api_region = dict (default = os .environ .get ('CLOUDSTACK_REGION' ) or 'cloudstack' ),
38+ api_verify_ssl_cert = dict (default = os .environ .get ('CLOUDSTACK_VERIFY' )),
3839 )
3940
4041
@@ -125,13 +126,15 @@ def get_api_config(self):
125126 'secret' : self .module .params .get ('api_secret' ) or config .get ('secret' ),
126127 'timeout' : self .module .params .get ('api_timeout' ) or config .get ('timeout' ) or 10 ,
127128 'method' : self .module .params .get ('api_http_method' ) or config .get ('method' ) or 'get' ,
129+ 'verify' : self .module .params .get ('api_verify_ssl_cert' ) or config .get ('verify' ),
128130 }
129131 self .result .update ({
130132 'api_region' : api_region ,
131133 'api_url' : api_config ['endpoint' ],
132134 'api_key' : api_config ['key' ],
133135 'api_timeout' : int (api_config ['timeout' ]),
134136 'api_http_method' : api_config ['method' ],
137+ 'api_verify_ssl_cert' : api_config ['verify' ],
135138 })
136139 if not all ([api_config ['endpoint' ], api_config ['key' ], api_config ['secret' ]]):
137140 self .fail_json (msg = "Missing api credentials: can not authenticate" )
0 commit comments