{"id":19647876,"url":"https://github.com/nl2go/ansible-role-hetzner-vswitch","last_synced_at":"2025-04-28T15:32:18.191Z","repository":{"id":101457679,"uuid":"224627418","full_name":"nl2go/ansible-role-hetzner-vswitch","owner":"nl2go","description":"An Ansible Role that manages Hetzner Robot vSwitch","archived":false,"fork":false,"pushed_at":"2020-05-07T08:36:22.000Z","size":100,"stargazers_count":9,"open_issues_count":4,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-05T09:24:53.767Z","etag":null,"topics":["ansible","ansible-role","hetzner","hetzner-robot-api"],"latest_commit_sha":null,"homepage":"https://galaxy.ansible.com/nl2go/hetzner_vswitch","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nl2go.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-28T10:23:34.000Z","updated_at":"2024-07-06T23:13:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"dde44f84-6034-43f4-adba-037f7ee72516","html_url":"https://github.com/nl2go/ansible-role-hetzner-vswitch","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nl2go%2Fansible-role-hetzner-vswitch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nl2go%2Fansible-role-hetzner-vswitch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nl2go%2Fansible-role-hetzner-vswitch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nl2go%2Fansible-role-hetzner-vswitch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nl2go","download_url":"https://codeload.github.com/nl2go/ansible-role-hetzner-vswitch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251338789,"owners_count":21573613,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ansible-role","hetzner","hetzner-robot-api"],"created_at":"2024-11-11T14:46:17.946Z","updated_at":"2025-04-28T15:32:18.179Z","avatar_url":"https://github.com/nl2go.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Travis (.org) branch](https://img.shields.io/travis/nl2go/ansible-role-hetzner-vswitch/master)](https://travis-ci.org/nl2go/ansible-role-hetzner-vswitch)\n[![Codecov](https://img.shields.io/codecov/c/github/nl2go/ansible-role-hetzner-vswitch)](https://codecov.io/gh/nl2go/ansible-role-hetzner-vswitch)\n[![Ansible Galaxy](https://img.shields.io/badge/role-nl2go.hetzner_vswitch-blue.svg)](https://galaxy.ansible.com/nl2go/hetzner_vswitch/)\n[![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/nl2go/ansible-role-hetzner-vswitch)](https://galaxy.ansible.com/nl2go/hetzner_vswitch)\n[![Ansible Galaxy Downloads](https://img.shields.io/ansible/role/d/45025.svg?color=blue)](https://galaxy.ansible.com/nl2go/hetzner_vswitch/)\n\n# Ansible Role: Hetzner vSwitch\n\nAn Ansible Role that manages [Hetzner Robot vSwitch](https://wiki.hetzner.de/index.php/Vswitch/en).\n\n## Prerequisites\n\n- Existing [Hetzner Online GmbH Account](https://accounts.hetzner.com).\n- Configured [Hetzner Robot Webservice Account](https://robot.your-server.de/preferences).\n\n## Requirements\n\n| Name | Type | Version | Location |\n|---|---|---|---|\n| [ansible-filter](https://github.com/nl2go/ansible-filter) | Python package | 1.0.1 | Control node |\n\n\n## Role Variables\n\nAvailable variables are listed below, along with default values (see `defaults/main.yml`):\n\n    hetzner_vswitch_webservice_base_url: https://robot-ws.your-server.de\n \nBase url that is pointing to the [Hetzner Robot API](https://robot.your-server.de/doc/webservice/de.html). The variable is mostly utilized for testing purposes, there\nis no need to change the default.\n\n    hetzner_vswitch_webservice_username: robot\n    \nWebservice login name. May be set/changed as described in the section [Change Access Data (Hetzner Wiki)](https://wiki.hetzner.de/index.php/KonsoleH:Zugangsdaten_aendern/en).\n\n    hetzner_vswitch_webservice_password: secret\n    \nWebservice password. May be set/changed as described in the section [Change Access Data (Hetzner Wiki)](https://wiki.hetzner.de/index.php/KonsoleH:Zugangsdaten_aendern/en).\n\n    hetzner_vswitch_instances:\n      - name: New vSwitch\n        vlan: 1234\n    \nMultiple vSwitch instances may be managed using `hetzner_vswitch_instances` variable. A vSwitch is \nidentified by the `name` attribute. The name must be unique to omit collision/unexpected behavior. \nThe `state` attribute for a vSwitch defaults to `present`.\n\n    hetzner_vswitch_instances:\n      - name: New vSwitch\n        interface: vlan1\n      \nVirtual interface name for the vSwitch based network may be specified using `interface` keyword. With `eth0` as physical interface\nand `1234` as VLAN ID it defaults to `eth0.1234` if not set.\n\n    hetzner_vswitch_instances:\n      - name: New vSwitch\n        state: absent\n\nTo ensure the vSwitch is removed add `state: absent`. The `name` attribute remains mandatory to identify origin state.\n\n    hetzner_vswitch_host:\n      - name: New vSwitch\n\nEvery host can be bound to one or multiple vSwitches defined within `hetzner_vswitch_instances` using the `hetzner_vswitch_host` variable. vSwitches\nare referenced by the `name` attribute.\n\nHosts with undefined `hetzner_vswitch_host` variable are ignored by the role.\n\n    hetzner_vswitch_host:\n      - name: New vSwitch\n        state: absent\n\nAdd `state: absent` to detach a host from a vSwitch. \n\n    hetzner_vswitch_instances:\n      - name: New vSwitch\n        vlan: 4001\n        ipv4_address: 192.168.100.0\n        ipv4_netmask: 255.255.255.0\n           \n    hetzner_vswitch_host:\n      - name: New vSwitch\n        ipv4_address: 192.168.100.1\n                   \nTo manage the underlying network configuration `ipv4_address` and `ipv4_netmask` must be present on the `hetzner_vswitch_instances`.\nA dedicated host IP address must be specified as `ipv4_address` within `hetzner_vswitch_host` variable.\n\n    hetzner_vswitch_webservice_concurrent_requests: 1\n    hetzner_vswitch_webservice_concurrent_poll: 1\n    \nTo speed up the role execution while handling the vSwitch configuration with multiple vSwitches, the number of parallel requests made to the Hetzner Robot API\ncan be controlled by `hetzner_vswitch_webservice_concurrent_requests` variable. The poll interval for asynchronous request\nresult processing is set using `hetzner_vswitch_webservice_concurrent_poll`. Check official documentation on\n[Asynchronous Actions and Polling](https://docs.ansible.com/ansible/latest/user_guide/playbooks_async.html) for more explanation. \n\n## Tags\n\nTags can be used to limit the role execution to a particular task module. Following tags are available:\n\n- `hetzner_vswitch`: Covers the full role lifecycle.\n- `hetzner_vswitch_install`, `install`: Installs required packages.\n- `hetzner_vswitch_config`, `config`: Configures related packages and resources.\n- `hetzner_vswitch_vswitch`, `config`: Manages vswitch configuration using [Hetzner Robot API](https://robot.your-server.de/doc/webservice/de.html).\n- `hetzner_vswitch_vswitch_server`, `config`: Adds/removes servers to/from a vswitch using [Hetzner Robot API](https://robot.your-server.de/doc/webservice/de.html).\n- `hetzner_vswitch_host`, `config`: Configures network settings on the target hosts.\n- `hetzner_vswitch_handle`, `handle`: Executes handlers when necessary.\n\n## Dependencies\n\nNone.\n\n## Example Playbook\n\n    - hosts: all\n      roles:\n         - nl2go.hetzner_vswitch\n\n## Development\nUse [docker-molecule](https://github.com/nl2go/docker-molecule) following the instructions to run [Molecule](https://molecule.readthedocs.io/en/stable/)\nor install [Molecule](https://molecule.readthedocs.io/en/stable/) locally (not recommended, version conflicts might appear).\n\n\nUse following to run tests:\n\n    molecule test --all\n\n## Maintainers\n\n- [pablo2go](https://github.com/pablo2go)\n- [build-failure](https://github.com/build-failure)\n\n## License\n\nSee the [LICENSE.md](LICENSE.md) file for details.\n\n## Author Information\n\nThis role was created by in 2019 by [Newsletter2Go GmbH](https://www.newsletter2go.com/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnl2go%2Fansible-role-hetzner-vswitch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnl2go%2Fansible-role-hetzner-vswitch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnl2go%2Fansible-role-hetzner-vswitch/lists"}