ngine_io / ngine_io.cloudstack / 2.3.0 / module / cs_vpc Manages VPCs on Apache CloudStack based clouds. | "added in version" 0.1.0 of ngine_io.cloudstack" Authors: René Moser (@resmo)ngine_io.cloudstack.cs_vpc (2.3.0) — module
Install with ansible-galaxy collection install ngine_io.cloudstack:==2.3.0
collections: - name: ngine_io.cloudstack version: 2.3.0
Create, update and delete VPCs.
- name: Ensure a VPC is present but not started after creating ngine_io.cloudstack.cs_vpc: name: my_vpc zone: zone01 display_text: My example VPC cidr: 10.10.0.0/16 state: stopped
- name: Ensure a VPC is present and started after creating ngine_io.cloudstack.cs_vpc: name: my_vpc zone: zone01 display_text: My example VPC cidr: 10.10.0.0/16
- name: Ensure a VPC is absent ngine_io.cloudstack.cs_vpc: name: my_vpc zone: zone01 state: absent
- name: Ensure a VPC is restarted with clean up ngine_io.cloudstack.cs_vpc: name: my_vpc zone: zone01 clean_up: yes state: restarted
cidr: description: - CIDR of the VPC, e.g. 10.1.0.0/16 - All VPC guest networks' CIDRs must be within this CIDR. - Required on I(state=present). type: str name: description: - Name of the VPC. required: true type: str tags: aliases: - tag description: - List of tags. Tags are a list of dictionaries having keys I(key) and I(value). - 'For deleting all tags, set an empty list e.g. I(tags: []).' elements: dict type: list zone: description: - Name of the zone. required: true type: str state: choices: - present - absent - stopped - restarted default: present description: - State of the VPC. - The state C(present) creates a started VPC. - The state C(stopped) is only considered while creating the VPC, added in version 2.6. type: str domain: description: - Domain the VPC is related to. type: str account: description: - Account the VPC is related to. type: str api_key: description: - API key of the CloudStack API. - If not given, the C(CLOUDSTACK_KEY) env variable is considered. required: true 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. required: true type: str project: description: - Name of the project the VPC is related to. type: str clean_up: description: - Whether to redeploy a VPC router or not when I(state=restarted) type: bool api_secret: description: - Secret key of the CloudStack API. - If not set, the C(CLOUDSTACK_SECRET) env variable is considered. required: true type: str poll_async: default: true description: - Poll async jobs until job has finished. type: bool api_timeout: default: 10 description: - HTTP timeout in seconds. - If not given, the C(CLOUDSTACK_TIMEOUT) env variable is considered. type: int display_text: description: - Display text of the VPC. - If not set, I(name) will be used for creating. type: str vpc_offering: description: - Name of the VPC offering. - If not set, default VPC offering is used. type: str network_domain: description: - Network domain for the VPC. - All networks inside the VPC will belong to this domain. - Only considered while creating the VPC, can not be changed. type: str api_http_method: choices: - get - post default: get description: - HTTP method used to query the API endpoint. - If not given, the C(CLOUDSTACK_METHOD) env variable is considered. type: str api_verify_ssl_cert: description: - Verify CA authority cert file. - If not given, the C(CLOUDSTACK_VERIFY) env variable is considered. type: str
account: description: Account the VPC is related to. returned: success sample: example account type: str cidr: description: CIDR of the VPC. returned: success sample: 10.10.0.0/16 type: str display_text: description: Display text of the VPC. returned: success sample: My example VPC type: str distributed_vpc_router: description: Whether the VPC uses distributed router or not. returned: success sample: true type: bool domain: description: Domain the VPC is related to. returned: success sample: example domain type: str id: description: UUID of the VPC. returned: success sample: 04589590-ac63-4ffc-93f5-b698b8ac38b6 type: str name: description: Name of the VPC. returned: success sample: my_vpc type: str network_domain: description: Network domain of the VPC. returned: success sample: example.com type: str project: description: Name of project the VPC is related to. returned: success sample: Production type: str redundant_vpc_router: description: Whether the VPC has redundant routers or not. returned: success sample: true type: bool region_level_vpc: description: Whether the VPC is region level or not. returned: success sample: true type: bool restart_required: description: Whether the VPC router needs a restart or not. returned: success sample: true type: bool state: description: State of the VPC. returned: success sample: Enabled type: str tags: description: List of resource tags associated with the VPC. returned: success sample: '[ { "key": "foo", "value": "bar" } ]' type: list zone: description: Name of zone the VPC is in. returned: success sample: ch-gva-2 type: str