community.hrobot.reset module – Reset a dedicated server

Note

This module is part of the community.hrobot collection (version 1.3.1).

You might already have this collection installed if you are using the ansible package. 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 community.hrobot.

To use it in a playbook, specify: community.hrobot.reset.

New in version 1.2.0: of community.hrobot

Synopsis

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

Parameters

Parameter

Comments

hetzner_password

string / required

The password for the Robot webservice user.

hetzner_user

string / required

The username for the Robot webservice user.

reset_type

string / required

How to reset the server.

software is a software reset. This should be similar to pressing Ctrl+Alt+Del on the keyboard.

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.

hardware is a hardware reset similar to pressing the Restart button. The power is cycled for the server.

manual is a manual reset. This requests a technician to manually do the shutdown while looking at the screen output. Be careful and only use this when really necessary!

Note that not every server supports every reset method!

Choices:

  • software

  • hardware

  • power

  • manual

server_number

integer / required

The server number of the server to reset.

Examples

- 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

- 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

- name: Request a manual reset (by a technican)
  community.hrobot.reset:
    hetzner_user: foo
    hetzner_password: bar
    server_number: 1234
    reset_type: manual

Authors

  • Felix Fontein (@felixfontein)