noderings.cloud.virtual_machine_additional_ip module – Add or remove additional IPv4 addresses on a NodeRings virtual machine
Note
This module is part of the noderings.cloud collection (version 0.2.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 noderings.cloud.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: noderings.cloud.virtual_machine_additional_ip.
New in noderings.cloud 0.1.0
Synopsis
Makes a virtual machine have
countadditional IPv4 addresses, or releases one address.Billing. On usage-billed VMs each address is charged per hour; on subscription VMs it is a monthly add-on charged pro rata now. Released addresses are cancelled immediately.
The new address is assigned by the provider. Configure it inside the guest yourself unless the provider does it.
Requirements
The below requirements are needed on the host that executes this module.
python >= 3.9
Parameters
Parameter |
Comments |
|---|---|
How many times a request is retried after rate limiting (HTTP 429) or a gateway error (HTTP 502, 503 or 504). Orders (virtual machines, game servers, snapshots) are never retried blindly. Default: |
|
Timeout in seconds for a single HTTP request. Default: |
|
A NodeRings service-account token. Create one in the NodeRings console under If not set, the value of the |
|
Base URL of the NodeRings API. If not set, the value of the Default: |
|
How many additional IPv4 addresses the VM should have. Used with When there are more, the most recently listed ones are released. |
|
With |
|
Organization to act in, sent as the Defaults to the organization the token belongs to. If not set, the value of the |
|
Choices:
|
|
Whether to validate the API’s TLS certificate. Choices:
|
|
Hostname or ID of the VM. |
Attributes
Attribute |
Support |
Description |
|---|---|---|
Support: full |
Can run in check_mode and return changed status prediction without modifying the target. |
|
Support: full |
Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode. |
Notes
Note
All modules in this collection belong to the
noderings.cloud.noderingsaction group, so connection options can be set once withmodule_defaults.
Examples
- name: Give the mail server a second address
noderings.cloud.virtual_machine_additional_ip:
vm: mail-1
count: 1
register: ips
- name: Release one address
noderings.cloud.virtual_machine_additional_ip:
vm: mail-1
ip_address: 203.0.113.77
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Addresses added by this run. Returned: always |
|
The VM’s additional addresses afterwards. Returned: always Sample: |
|
What the API said about the charge for the last added address. Returned: when an address was added |
|
Addresses released by this run. Returned: always |