kowabunga.cloud.subnet module – Manage Kowabunga subnets

Note

This module is part of the kowabunga.cloud collection (version 0.1.0).

It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install kowabunga.cloud. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: kowabunga.cloud.subnet.

Synopsis

  • Create, update or delete a Kowabunga subnet.

Requirements

The below requirements are needed on the host that executes this module.

  • python >= 3.8

  • kowabunga >= 0.52.5

Parameters

Parameter

Comments

api_key

string / required

Private API key used to connect with specified Kowabunga Kahuna endpoint. Recommended to be encrypted using Ansible Vault or SOPS.

application

string

Subnet application type.

Choices:

  • "ceph"

  • "user" ← (default)

cidr

string / required

CIDR block for the subnet (e.g. 192.168.1.0/24).

This attribute cannot be updated.

description

string

Description for the subnet.

dns

string

DNS server IP address for the subnet.

endpoint

string / required

HTTPS(S) URI of the Kowabunga Kahuna endpoint. Should be formatted as https://kowabunga.acme.com for example.

extra_routes

list / elements=string

List of extra static routes (CIDR notation).

gateway

string / required

Default gateway IP address for the subnet.

name

string / required

Name for the subnet.

This attribute cannot be updated.

state

string

Should the resource be present or absent.

Choices:

  • "present" ← (default)

  • "absent"

vnet

string / required

Name (or ID) of the virtual network where the subnet will be created.

Examples

- name: Create a subnet
  kowabunga.cloud.subnet:
    endpoint: https://kowabunga.acme.com
    api_key: API_KEY
    name: subnet-01
    cidr: 192.168.1.0/24
    gateway: 192.168.1.1
    vnet: vnet-01

- name: Delete a subnet
  kowabunga.cloud.subnet:
    endpoint: https://kowabunga.acme.com
    api_key: API_KEY
    name: subnet-01
    vnet: vnet-01
    state: absent

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

subnet

dictionary

Dictionary describing the subnet.

Returned: On success when state is present.

application

string

Application type

Returned: success

Sample: "user"

cidr

string

CIDR block

Returned: success

Sample: "192.168.1.0/24"

description

string

Subnet description

Returned: success

Sample: "Subnet 01"

dns

string

DNS server

Returned: success

Sample: "8.8.8.8"

gateway

string

Default gateway

Returned: success

Sample: "192.168.1.1"

id

string

Subnet ID

Returned: success

Sample: "6850281677f2462b6919dbe5"

name

string

Subnet name

Returned: success

Sample: "subnet-01"

Authors

  • The Kowabunga Project