- Docs »
- cloudscale_ch.cloud.network – Manages networks on the cloudscale.ch IaaS service
-
You are reading the latest community version of the Ansible documentation. Red Hat subscribers, select 2.9 in the version selection to the left for the most recent Red Hat release.
cloudscale_ch.cloud.network – Manages networks on the cloudscale.ch IaaS service
Note
This plugin is part of the cloudscale_ch.cloud collection (version 2.1.0).
To install it use: ansible-galaxy collection install cloudscale_ch.cloud
.
To use it in a playbook, specify: cloudscale_ch.cloud.network
.
New in version 1.2.0: of cloudscale_ch.cloud
Parameter |
Choices/Defaults |
Comments |
api_timeout
integer
|
Default:
30
|
Timeout in seconds for calls to the cloudscale.ch API.
|
api_token
string
/ required
|
|
cloudscale.ch API token.
This can also be passed in the CLOUDSCALE_API_TOKEN environment variable.
|
api_url
string
added in 1.3.0 of cloudscale_ch.cloud
|
Default:
"https://api.cloudscale.ch/v1"
|
cloudscale.ch API URL.
This can also be passed in the CLOUDSCALE_API_URL environment variable.
|
auto_create_ipv4_subnet
boolean
|
|
Whether to automatically create an IPv4 subnet in the network or not.
|
mtu
integer
|
Default:
9000
|
The MTU of the network.
|
name
string
|
|
Name of the network.
Either name or uuid is required.
|
state
string
|
Choices:
present ←
- absent
|
State of the network.
|
tags
dictionary
|
|
Tags assosiated with the networks. Set this to {} to clear any tags.
|
uuid
string
|
|
UUID of the network.
Either name or uuid is required.
|
zone
string
|
|
Zone slug of the network (e.g. lgp1 or rma1 ).
|
---
- 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
Common return values are documented here, the following are the fields unique to this module:
Key |
Returned |
Description |
created_at
string
|
success |
The creation date and time of the network.
Sample:
2019-05-29T13:18:42.511407Z
|
href
string
|
success |
API URL to get details about this network.
Sample:
https://api.cloudscale.ch/v1/networks/cfde831a-4e87-4a75-960f-89b0148aa2cc
|
mtu
integer
|
success |
The MTU of the network.
Sample:
9000
|
name
string
|
success |
The name of the network.
Sample:
my network
|
state
string
|
success |
State of the network.
Sample:
present
|
subnets
complex
|
success |
A list of subnets objects of the network.
|
|
cidr
string
|
success |
The CIDR of the subnet.
Sample:
172.16.0.0/24
|
|
href
string
|
success |
API URL to get details about the subnet.
Sample:
https://api.cloudscale.ch/v1/subnets/33333333-1864-4608-853a-0771b6885a3
|
|
uuid
string
|
success |
The unique identifier for the subnet.
Sample:
33333333-1864-4608-853a-0771b6885a3
|
tags
dictionary
|
success |
Tags assosiated with the network.
Sample:
{'project': 'my project'}
|
uuid
string
|
success |
The unique identifier for the network.
Sample:
cfde831a-4e87-4a75-960f-89b0148aa2cc
|
zone
dictionary
|
success |
The zone of the network.
Sample:
{'slug': 'rma1'}
|