New in version 2.5.
The below requirements are needed on the host that executes this module.
| Parameter | Choices/Defaults | Comments |
|---|---|---|
| add_members | List of server identifiers (name or id) to be added to the private network. | |
| api_url | Custom API URL. Overrides the ONEANDONE_API_URL environement variable. | |
| auth_token required | Authenticating API token provided by 1&1. | |
| datacenter | The identifier of the datacenter where the private network will be created | |
| description | Set a description for the network. | |
| name required | Private network name used with present state. Used as identifier (id or name) when used with absent state. | |
| network_address | Set a private network space, i.e. 192.168.1.0 | |
| private_network required | The identifier (id or name) of the network used with update state. | |
| remove_members | List of server identifiers (name or id) to be removed from the private network. | |
| state |
| Define a network's state to create, remove, or update. |
| subnet_mask | Set the netmask for the private network, i.e. 255.255.255.0 | |
| wait bool |
| wait for the instance to be in state 'running' before returning |
| wait_interval | Default: 5 | Defines the number of seconds to wait when using the _wait_for methods |
| wait_timeout | Default: 600 | how long before wait gives up, in seconds |
# Provisioning example. Create and destroy private networks.
- 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
- oneandone_private_network:
auth_token: oneandone_private_api_key
state: absent
name: backup_network
# Modify the private network.
- 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
# Add members to the private network.
- oneandone_private_network:
auth_token: oneandone_private_api_key
state: update
private_network: backup_network
add_members:
- server identifier (id or name)
# Remove members from the private network.
- oneandone_private_network:
auth_token: oneandone_private_api_key
state: update
private_network: backup_network
remove_members:
- server identifier (id or name)
Common return values are documented here, the following are the fields unique to this module:
| Key | Returned | Description |
|---|---|---|
| private_network dict | always | Information about the private network. Sample: {"name": "backup_network", "id": "55726DEDA20C99CF6F2AF8F18CAC9963"} |
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
This module is flagged as community which means that it is maintained by the Ansible Community. See Module Maintenance & Support for more info.
For a list of other modules that are also maintained by the Ansible Community, see here.
Hint
If you notice any issues in this documentation you can edit this document to improve it.
© 2012–2018 Michael DeHaan
© 2018 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.7/modules/oneandone_private_network_module.html