cloudscale_ch / cloudscale_ch.cloud / 2.3.1 / module / network Manages networks on the cloudscale.ch IaaS service | "added in version" 1.2.0 of cloudscale_ch.cloud" Authors: René Moser (@resmo)cloudscale_ch.cloud.network (2.3.1) — module
Install with ansible-galaxy collection install cloudscale_ch.cloud:==2.3.1
collections: - name: cloudscale_ch.cloud version: 2.3.1
Create, update and remove networks.
--- - name: Ensure network exists cloudscale_ch.cloud.network: name: my network api_token: xxxxxx
- name: Ensure network in a specific zone cloudscale_ch.cloud.network: name: my network zone: lpg1 api_token: xxxxxx
- name: Ensure a network is absent cloudscale_ch.cloud.network: name: my network state: absent api_token: xxxxxx
mtu: default: 9000 description: - The MTU of the network. type: int name: description: - Name of the network. - Either I(name) or I(uuid) is required. type: str tags: description: - Tags assosiated with the networks. Set this to C({}) to clear any tags. type: dict uuid: description: - UUID of the network. - Either I(name) or I(uuid) is required. type: str zone: description: - Zone slug of the network (e.g. C(lpg1) or C(rma1)). type: str state: choices: - present - absent default: present description: - State of the network. type: str api_url: default: https://api.cloudscale.ch/v1 description: - cloudscale.ch API URL. - This can also be passed in the C(CLOUDSCALE_API_URL) environment variable. type: str version_added: 1.3.0 version_added_collection: cloudscale_ch.cloud api_token: description: - cloudscale.ch API token. - This can also be passed in the C(CLOUDSCALE_API_TOKEN) environment variable. required: true type: str api_timeout: default: 45 description: - Timeout in seconds for calls to the cloudscale.ch API. - This can also be passed in the C(CLOUDSCALE_API_TIMEOUT) environment variable. type: int auto_create_ipv4_subnet: default: true description: - Whether to automatically create an IPv4 subnet in the network or not. type: bool
created_at: description: The creation date and time of the network. returned: success sample: '2019-05-29T13:18:42.511407Z' type: str href: description: API URL to get details about this network. returned: success sample: https://api.cloudscale.ch/v1/networks/cfde831a-4e87-4a75-960f-89b0148aa2cc type: str mtu: description: The MTU of the network. returned: success sample: 9000 type: int name: description: The name of the network. returned: success sample: my network type: str state: description: State of the network. returned: success sample: present type: str subnets: contains: cidr: description: The CIDR of the subnet. returned: success sample: 172.16.0.0/24 type: str href: description: API URL to get details about the subnet. returned: success sample: https://api.cloudscale.ch/v1/subnets/33333333-1864-4608-853a-0771b6885a3 type: str uuid: description: The unique identifier for the subnet. returned: success sample: 33333333-1864-4608-853a-0771b6885a3 type: str description: A list of subnets objects of the network. returned: success type: complex tags: description: Tags assosiated with the network. returned: success sample: project: my project type: dict uuid: description: The unique identifier for the network. returned: success sample: cfde831a-4e87-4a75-960f-89b0148aa2cc type: str zone: description: The zone of the network. returned: success sample: slug: rma1 type: dict