community.general.oneandone_public_ip (8.5.0) — module

Configure 1&1 public IPs

Authors: Amel Ajdinovic (@aajdinov), Ethan Devenport (@edevenport)

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

Create, update, and remove public IPs. This module has a dependency on 1and1 >= 1.0.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create a public IP
  community.general.oneandone_public_ip:
    auth_token: oneandone_private_api_key
    reverse_dns: example.com
    datacenter: US
    type: IPV4
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Update a public IP
  community.general.oneandone_public_ip:
    auth_token: oneandone_private_api_key
    public_ip_id: public ip id
    reverse_dns: secondexample.com
    state: update
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete a public IP
  community.general.oneandone_public_ip:
    auth_token: oneandone_private_api_key
    public_ip_id: public ip id
    state: absent

Inputs

    
type:
    choices:
    - IPV4
    - IPV6
    default: IPV4
    description:
    - Type of IP. Currently, only IPV4 is available.
    required: false
    type: str

wait:
    default: true
    description:
    - wait for the instance to be in state 'running' before returning
    required: false
    type: bool

state:
    choices:
    - present
    - absent
    - update
    default: present
    description:
    - Define a public ip state to create, remove, or update.
    required: false
    type: str

api_url:
    description:
    - Custom API URL. Overrides the ONEANDONE_API_URL environment variable.
    required: false
    type: str

auth_token:
    description:
    - Authenticating API token provided by 1&1.
    type: str

datacenter:
    choices:
    - US
    - ES
    - DE
    - GB
    default: US
    description:
    - ID of the datacenter where the IP will be created (only for unassigned IPs).
    required: false
    type: str

reverse_dns:
    description:
    - Reverse DNS name. maxLength=256
    required: false
    type: str

public_ip_id:
    description:
    - The ID of the public IP used with update and delete states.
    type: str

wait_timeout:
    default: 600
    description:
    - how long before wait gives up, in seconds
    type: int

wait_interval:
    default: 5
    description:
    - Defines the number of seconds to wait when using the _wait_for methods
    type: int

Outputs

public_ip:
  description: Information about the public ip that was processed
  returned: always
  sample: '{"id": "F77CC589EBC120905B4F4719217BFF6D", "ip": "10.5.132.106"}'
  type: dict