community.general.oneandone_private_network module – Configure 1&1 private networking
Note
This module is part of the community.general collection (version 10.0.1).
You might already have this collection installed if you are using the ansible
package.
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 community.general
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: community.general.oneandone_private_network
.
Synopsis
Create, remove, reconfigure, update a private network. This module has a dependency on 1and1 >= 1.0.
Requirements
The below requirements are needed on the host that executes this module.
1and1
Parameters
Parameter |
Comments |
---|---|
List of server identifiers (name or id) to be added to the private network. Default: |
|
Custom API URL. Overrides the ONEANDONE_API_URL environment variable. |
|
Authenticating API token provided by 1&1. |
|
The identifier of the datacenter where the private network will be created Choices:
|
|
Set a description for the network. |
|
Private network name used with present state. Used as identifier (id or name) when used with absent state. |
|
Set a private network space, i.e. 192.168.1.0 |
|
The identifier (id or name) of the network used with update state. |
|
List of server identifiers (name or id) to be removed from the private network. Default: |
|
Define a network’s state to create, remove, or update. Choices:
|
|
Set the netmask for the private network, i.e. 255.255.255.0 |
|
wait for the instance to be in state ‘running’ before returning Choices:
|
|
Defines the number of seconds to wait when using the _wait_for methods Default: |
|
how long before wait gives up, in seconds Default: |
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: full |
Can run in |
|
Support: none |
Will return details on what has changed (or possibly needs changing in |
Examples
- name: Create a private network
community.general.oneandone_private_network:
auth_token: oneandone_private_api_key
name: backup_network
description: Testing creation of a private network with ansible
network_address: 70.35.193.100
subnet_mask: 255.0.0.0
datacenter: US
- name: Destroy a private network
community.general.oneandone_private_network:
auth_token: oneandone_private_api_key
state: absent
name: backup_network
- name: Modify the private network
community.general.oneandone_private_network:
auth_token: oneandone_private_api_key
state: update
private_network: backup_network
network_address: 192.168.2.0
subnet_mask: 255.255.255.0
- name: Add members to the private network
community.general.oneandone_private_network:
auth_token: oneandone_private_api_key
state: update
private_network: backup_network
add_members:
- server identifier (id or name)
- name: Remove members from the private network
community.general.oneandone_private_network:
auth_token: oneandone_private_api_key
state: update
private_network: backup_network
remove_members:
- server identifier (id or name)
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Information about the private network. Returned: always Sample: |