community.hrobot.reset (1.9.1) — module

Reset a dedicated server

| "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

Reset a dedicated server with a software or hardware reset, or by requesting a manual reset.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Send ACPI signal to server to request controlled shutdown
  community.hrobot.reset:
    hetzner_user: foo
    hetzner_password: bar
    failover_ip: 1.2.3.4
    state: power
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Make sure that the server supports manual reset
  community.hrobot.reset:
    hetzner_user: foo
    hetzner_password: bar
    server_number: 1234
    reset_type: manual
  check_mode: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Request a manual reset (by a technican)
  community.hrobot.reset:
    hetzner_user: foo
    hetzner_password: bar
    server_number: 1234
    reset_type: manual

Inputs

    
reset_type:
    choices:
    - software
    - hardware
    - power
    - manual
    description:
    - How to reset the server.
    - V(software) is a software reset. This should be similar to pressing Ctrl+Alt+Del
      on the keyboard.
    - V(power) is a hardware reset similar to pressing the Power button. An ACPI signal
      is sent, and if the server is configured correctly, this will trigger a regular
      shutdown.
    - V(hardware) is a hardware reset similar to pressing the Restart button. The power
      is cycled for the server.
    - V(manual) is a manual reset. This requests a technician to manually do the shutdown
      while looking at the screen output. B(Be careful) and only use this when really
      necessary!
    - Note that not every server supports every reset method!
    required: true
    type: str

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

server_number:
    description:
    - The server number of the server to reset.
    required: true
    type: int

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