community.hrobot.failover_ip_info (1.9.1) — module

Retrieve information on Hetzner's failover IPs

Authors: Felix Fontein (@felixfontein)

Install collection

Install with ansible-galaxy collection install community.hrobot:==1.9.1


Add to requirements.yml

  collections:
    - name: community.hrobot
      version: 1.9.1

Description

Retrieve information on Hetzner's failover IPs.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get value of failover IP 1.2.3.4
  community.hrobot.failover_ip_info:
    hetzner_user: foo
    hetzner_password: bar
    failover_ip: 1.2.3.4
    value: 5.6.7.8
  register: result
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Print value of failover IP 1.2.3.4 in case it is routed
  ansible.builtin.debug:
    msg: "1.2.3.4 routes to {{ result.value }}"
  when: result.state == 'routed'

Inputs

    
failover_ip:
    description: The failover IP address.
    required: true
    type: str

hetzner_user:
    description: The username for the Robot webservice user.
    required: true
    type: str

hetzner_password:
    description: The password for the Robot webservice user.
    required: true
    type: str

Outputs

failover_ip:
  description:
  - The failover IP.
  returned: success
  sample: 1.2.3.4
  type: str
failover_netmask:
  description:
  - The netmask for the failover IP.
  returned: success
  sample: 255.255.255.255
  type: str
server_ip:
  description:
  - The main IP of the server this failover IP is associated to.
  - This is I(not) the server the failover IP is routed to.
  returned: success
  type: str
server_number:
  description:
  - The number of the server this failover IP is associated to.
  - This is I(not) the server the failover IP is routed to.
  returned: success
  type: int
state:
  description:
  - Will be V(routed) or V(unrouted).
  returned: success
  type: str
value:
  description:
  - The value of the failover IP.
  - Will be V(none) if the IP is unrouted.
  returned: success
  type: str

See also