community.hrobot.server_info (1.9.1) — module

Query information on one or more servers

| "added in version" 1.2.0 of community.hrobot"

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

Query information on one or more servers.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Query a list of all servers
  community.hrobot.server_info:
    hetzner_user: foo
    hetzner_password: bar
  register: result
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Query a specific server
  community.hrobot.server_info:
    hetzner_user: foo
    hetzner_password: bar
    server_number: 23
  register: result
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Output data on specific server
  ansible.builtin.debug:
    msg: "Server name: {{ result.servers[0].server_name }}"

Inputs

    
full_info:
    default: false
    description:
    - Whether to provide full information for every server.
    - Setting this to V(true) requires one REST call per server, which is slow and reduces
      your rate limit. Use with care.
    - When O(server_number) is specified, this option is set to V(true).
    type: bool

server_name:
    description:
    - Limit result list to servers of this name.
    type: str

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

server_number:
    description:
    - Limit result list to server with this number.
    type: int

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

Outputs

servers:
  contains:
    cancelled:
      description:
      - Whether the server is cancelled.
      returned: success
      sample: false
      type: bool
    cpanel:
      description:
      - Flag of cPanel installation availability.
      returned: when O(full_info=true)
      sample: true
      type: bool
    dc:
      description:
      - The data center the server is located in.
      returned: success
      sample: NBG1-DC1
      type: str
    hot_swap:
      description:
      - Flag of Hot Swap availability.
      returned: when O(full_info=true)
      sample: true
      type: bool
    ip:
      description:
      - List of assigned single IP addresses.
      elements: str
      returned: success
      sample:
      - 123.123.123.123
      type: list
    linked_storagebox:
      description:
      - Linked Storage Box ID.
      returned: when O(full_info=true)
      sample: 12345
      type: int
    paid_until:
      description:
      - The date until the server has been paid.
      returned: success
      sample: '2018-08-04'
      type: str
    plesk:
      description:
      - Flag of Plesk installation availability.
      returned: when O(full_info=true)
      sample: true
      type: bool
    product:
      description:
      - The server product name.
      returned: success
      sample: EQ 8
      type: str
    rescue:
      description:
      - Whether the rescue system is available.
      returned: when O(full_info=true)
      sample: false
      type: bool
    reset:
      description:
      - Whether the server can be automatically reset.
      returned: when O(full_info=true)
      sample: true
      type: bool
    server_ip:
      description:
      - The server's main IP address.
      returned: success
      sample: 123.123.123.123
      type: str
    server_ipv6_net:
      description:
      - The server's main IPv6 network address.
      returned: success
      sample: '2a01:f48:111:4221::'
      type: str
    server_name:
      description:
      - The user-defined server's name.
      returned: success
      sample: server1
      type: str
    server_number:
      description:
      - The server's numeric ID.
      returned: success
      sample: 321
      type: int
    status:
      choices:
      - ready
      - in process
      description:
      - Server status.
      returned: success
      sample: ready
      type: str
    subnet:
      contains:
        ip:
          description:
          - The first IP in the subnet.
          sample: '2a01:4f8:111:4221::'
          type: str
        mask:
          description:
          - The masks bitlength.
          sample: '64'
          type: str
      description:
      - List of assigned subnets.
      elements: dict
      returned: success
      sample:
      - ip: '2a01:4f8:111:4221::'
        mask: 64
      type: list
    traffic:
      description:
      - Free traffic quota.
      - V(unlimited) in case of unlimited traffic.
      returned: success
      sample: 5 TB
      type: str
    vnc:
      description:
      - Flag of VNC installation availability.
      returned: when O(full_info=true)
      sample: true
      type: bool
    windows:
      description:
      - Flag of Windows installation availability.
      returned: when O(full_info=true)
      sample: true
      type: bool
    wol:
      description:
      - Flag of Wake On Lan availability.
      returned: when O(full_info=true)
      sample: true
      type: bool
  description:
  - List of servers matching the provided options.
  elements: dict
  returned: success
  type: list