ansible / ansible.builtin / v2.3.2.0-1 / module / cs_vpc Manages VPCs on Apache CloudStack based clouds. | "added in version" 2.3 of ansible.builtin" Authors: René Moser (@resmo) stableinterface | supported by communityansible.builtin.cs_vpc (v2.3.2.0-1) — module
pip
Install with pip install ansible==2.3.2.0.post1
Create, update and delete VPCs.
# Ensure a VPC is present - local_action: module: cs_vpc name: my_vpc display_text: My example VPC cidr: 10.10.0.0/16
# Ensure a VPC is absent - local_action: module: cs_vpc name: my_vpc state: absent
# Ensure a VPC is restarted - local_action: module: cs_vpc name: my_vpc state: restarted
cidr: default: null description: - CIDR of the VPC, e.g. 10.1.0.0/16 - All VPC guest networks' CIDRs must be within this CIDR. - Required on C(state=present). required: false name: description: - Name of the VPC. required: true tags: aliases: - tag default: null description: - List of tags. Tags are a list of dictionaries having keys C(key) and C(value). - 'For deleting all tags, set an empty list e.g. C(tags: []).' required: false zone: default: null description: - Name of the zone. - If not set, default zone is used. required: false state: choices: - present - absent - restarted default: present description: - State of the VPC. required: false domain: default: null description: - Domain the VPC is related to. required: false account: default: null description: - Account the VPC is related to. required: false 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: default: null description: - Name of the project the VPC is related to. required: false 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. required: false api_timeout: default: 10 description: - HTTP timeout in seconds. - If not given, the C(CLOUDSTACK_TIMEOUT) env variable is considered. type: int display_text: default: null description: - Display text of the VPC. - If not set, C(name) will be used for creating. required: false vpc_offering: default: null description: - Name of the VPC offering. - If not set, default VPC offering is used. required: false network_domain: default: null description: - Network domain for the VPC. - All networks inside the VPC will belong to this domain. required: false 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: string cidr: description: CIDR of the VPC. returned: success sample: 10.10.0.0/16 type: string display_text: description: Display text of the VPC. returned: success sample: My example VPC type: string distributed_vpc_router: description: Whether the VPC uses distributed router or not. returned: success sample: true type: boolean domain: description: Domain the VPC is related to. returned: success sample: example domain type: string id: description: UUID of the VPC. returned: success sample: 04589590-ac63-4ffc-93f5-b698b8ac38b6 type: string name: description: Name of the VPC. returned: success sample: my_vpc type: string network_domain: description: Network domain of the VPC. returned: success sample: example.com type: string project: description: Name of project the VPC is related to. returned: success sample: Production type: string redundant_vpc_router: description: Whether the VPC has redundant routers or not. returned: success sample: true type: boolean region_level_vpc: description: Whether the VPC is region level or not. returned: success sample: true type: boolean restart_required: description: Wheter the VPC router needs a restart or not. returned: success sample: true type: boolean state: description: State of the VPC. returned: success sample: Enabled type: string tags: description: List of resource tags associated with the VPC. returned: success sample: '[ { "key": "foo", "value": "bar" } ]' type: dict zone: description: Name of zone the VPC is in. returned: success sample: ch-gva-2 type: string