Commit 860a96cf by Brian Coca

Merge pull request #11097 from resmo/for-ansible

cloudstack: updates and v1 sync
parents bc041ffe caf3cf69
......@@ -64,12 +64,14 @@ class AnsibleCloudStack:
api_secret = self.module.params.get('secret_key')
api_url = self.module.params.get('api_url')
api_http_method = self.module.params.get('api_http_method')
api_timeout = self.module.params.get('api_timeout')
if api_key and api_secret and api_url:
self.cs = CloudStack(
endpoint=api_url,
key=api_key,
secret=api_secret,
timeout=api_timeout,
method=api_http_method
)
else:
......
......@@ -27,34 +27,36 @@ options:
- API key of the CloudStack API.
required: false
default: null
aliases: []
api_secret:
description:
- Secret key of the CloudStack API.
required: false
default: null
aliases: []
api_url:
description:
- URL of the CloudStack API e.g. https://cloud.example.com/client/api.
required: false
default: null
aliases: []
api_http_method:
description:
- HTTP method used.
required: false
default: 'get'
aliases: []
choices: [ 'get', 'post' ]
api_timeout:
description:
- HTTP timeout.
required: false
default: 10
requirements:
- "python >= 2.6"
- cs
notes:
- Ansible uses the C(cs) library's configuration method if credentials are not
provided by the options C(api_url), C(api_key), C(api_secret).
Configuration is read from several locations, in the following order":"
Configuration is read from several locations, in the following order.
- The C(CLOUDSTACK_ENDPOINT), C(CLOUDSTACK_KEY), C(CLOUDSTACK_SECRET) and
C(CLOUDSTACK_METHOD) environment variables.
C(CLOUDSTACK_METHOD). C(CLOUDSTACK_TIMEOUT) environment variables.
- A C(CLOUDSTACK_CONFIG) environment variable pointing to an C(.ini) file,
- A C(cloudstack.ini) file in the current working directory.
- A C(.cloudstack.ini) file in the users home directory.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment