nl2go.hetzner_vswitch

Ansible Role: Hetzner vSwitch

This is an Ansible role that helps you manage the Hetzner Robot vSwitch.

Prerequisites

  • You need an existing Hetzner Online GmbH account.
  • You need to have your Hetzner Robot Webservice account set up.

Requirements

You need the following:

Name Type Version Location
ansible-filter Python package 1.0.1 Control node

Role Variables

Here are some variables you can use, along with their default values:

  • hetzner_vswitch_webservice_base_url: https://robot-ws.your-server.de

    • This is the base URL for the Hetzner Robot API, mainly used for testing.
  • hetzner_vswitch_webservice_username: robot

    • Your web service login name. You can change it if needed.
  • hetzner_vswitch_webservice_password: secret

    • Your web service password. You can change it if needed.
  • hetzner_vswitch_instances:

    • You can manage multiple vSwitch instances with this variable. Each vSwitch needs a unique name to avoid conflicts. The default state for a vSwitch is present.
  • hetzner_vswitch_host:

    • Use this variable to connect hosts to one or more vSwitches. If a host doesn’t have this variable defined, it will be ignored.
  • You can also set state: to absent if you want to remove a vSwitch or detach a host from a vSwitch.

  • ipv4_address and ipv4_netmask are required to manage network settings.

  • You can control how many requests are sent to the Hetzner API at once with hetzner_vswitch_webservice_concurrent_requests and set the polling interval with hetzner_vswitch_webservice_concurrent_poll.

Tags

You can use tags to limit what tasks get executed:

  • hetzner_vswitch: Runs the entire role.
  • hetzner_vswitch_install, install: Installs necessary packages.
  • hetzner_vswitch_config, config: Configures related resources.
  • hetzner_vswitch_vswitch, config: Manages vSwitch configurations.
  • hetzner_vswitch_vswitch_server, config: Adds or removes servers to/from a vSwitch.
  • hetzner_vswitch_host, config: Configures network settings on hosts.
  • hetzner_vswitch_handle, handle: Runs handlers when needed.

Dependencies

There are no dependencies.

Example Playbook

- hosts: all
  roles:
     - nl2go.hetzner_vswitch

Development

To test your changes, use docker-molecule or install Molecule locally (note that local installation may lead to version conflicts).

Run tests using:

molecule test --all

Maintainers

License

See the LICENSE.md file for more details.

Author Information

This role was created by Newsletter2Go GmbH in 2019.

Informazioni sul progetto

Manage Hetzner Robot vSwitch (https://wiki.hetzner.de/index.php/Vswitch/en) using Ansible.

Installa
ansible-galaxy install nl2go.hetzner_vswitch
Licenza
Unknown
Download
11.2k
Proprietario