community / community.general / 0.1.1 / module / cs_region Manages regions on Apache CloudStack based clouds. Authors: René Moser (@resmo) preview | supported by communitycommunity.general.cs_region (0.1.1) — module
Install with ansible-galaxy collection install community.general:==0.1.1
collections: - name: community.general version: 0.1.1
Add, update and remove regions.
- name: create a region cs_region: id: 2 name: geneva endpoint: https://cloud.gva.example.com delegate_to: localhost
- name: remove a region with ID 2 cs_region: id: 2 state: absent delegate_to: localhost
id: description: - ID of the region. - Must be an number (int). required: true type: int name: description: - Name of the region. - Required if I(state=present) type: str state: choices: - present - absent default: present description: - State of the region. type: str api_key: description: - API key of the CloudStack API. - If not given, the C(CLOUDSTACK_KEY) env variable is considered. - As the last option, the value is taken from the ini config file, also see the notes. type: str api_url: description: - URL of the CloudStack API e.g. https://cloud.example.com/client/api. - If not given, the C(CLOUDSTACK_ENDPOINT) env variable is considered. - As the last option, the value is taken from the ini config file, also see the notes. type: str endpoint: description: - Endpoint URL of the region. - Required if I(state=present) type: str api_region: default: cloudstack description: - Name of the ini section in the C(cloustack.ini) file. - If not given, the C(CLOUDSTACK_REGION) env variable is considered. type: str api_secret: description: - Secret key of the CloudStack API. - If not set, the C(CLOUDSTACK_SECRET) env variable is considered. - As the last option, the value is taken from the ini config file, also see the notes. type: str api_timeout: description: - HTTP timeout in seconds. - If not given, the C(CLOUDSTACK_TIMEOUT) env variable is considered. - As the last option, the value is taken from the ini config file, also see the notes. - Fallback value is 10 seconds if not specified. type: int api_http_method: choices: - get - post description: - HTTP method used to query the API endpoint. - If not given, the C(CLOUDSTACK_METHOD) env variable is considered. - As the last option, the value is taken from the ini config file, also see the notes. - Fallback value is C(get) if not specified. type: str
endpoint: description: Endpoint of the region. returned: success sample: http://cloud.example.com type: str gslb_service_enabled: description: Whether the GSLB service is enabled or not. returned: success sample: true type: bool id: description: ID of the region. returned: success sample: 1 type: int name: description: Name of the region. returned: success sample: local type: str portable_ip_service_enabled: description: Whether the portable IP service is enabled or not. returned: success sample: true type: bool