cloudscale_ch.cloud.network – Manages networks on the cloudscale.ch IaaS service

From Get docs
Ansible/docs/2.10/collections/cloudscale ch/cloud/network module


cloudscale_ch.cloud.network – Manages networks on the cloudscale.ch IaaS service

Note

This plugin is part of the cloudscale_ch.cloud collection (version 1.3.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


Synopsis

  • Create, update and remove networks.

Parameters

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:

cloudscale.ch API URL.

This can also be passed in the CLOUDSCALE_API_URL environment variable.

auto_create_ipv4_subnet

boolean

  • no
  • yes

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

  • 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).



Notes

Note


Examples

---
- 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

Return Values

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:

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:

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'}




Authors

  • René Moser (@resmo)

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.10/collections/cloudscale_ch/cloud/network_module.html