https://github.com/robertdebock/ansible-role-tailscale
Install and configure tailscale on your system.
https://github.com/robertdebock/ansible-role-tailscale
ansible molecule network networking playbook security tailscale tox vpn
Last synced: 9 months ago
JSON representation
Install and configure tailscale on your system.
- Host: GitHub
- URL: https://github.com/robertdebock/ansible-role-tailscale
- Owner: robertdebock
- License: apache-2.0
- Created: 2023-04-18T09:53:22.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-09-30T13:26:26.000Z (over 1 year ago)
- Last Synced: 2025-02-07T04:11:35.273Z (over 1 year ago)
- Topics: ansible, molecule, network, networking, playbook, security, tailscale, tox, vpn
- Homepage: https://robertdebock.nl/
- Size: 61.5 KB
- Stars: 9
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# [Ansible role tailscale](#ansible-role-tailscale)
Install and configure tailscale on your system.
|GitHub|GitLab|Downloads|Version|
|------|------|---------|-------|
|[](https://github.com/robertdebock/ansible-role-tailscale/actions)|[](https://gitlab.com/robertdebock-iac/ansible-role-tailscale)|[](https://galaxy.ansible.com/robertdebock/tailscale)|[](https://github.com/robertdebock/ansible-role-tailscale/releases/)|
## [Example Playbook](#example-playbook)
This example is taken from [`molecule/default/converge.yml`](https://github.com/robertdebock/ansible-role-tailscale/blob/master/molecule/default/converge.yml) and is tested on each push, pull request and release.
```yaml
---
- name: Converge
hosts: all
become: true
gather_facts: true
roles:
- role: robertdebock.tailscale
# When setting the `tailscale_authkey`, a node can join automatically.
# In case the `tailscale_authkey` is unset, registration of the node is manual.
# tailscale_authkey: "tskey-auth-KEY_IDENTITY-KEY_SERET_KEY_SERET_KEY_SERET_KE"
# You can request the node to publish itself as an exit node.
tailscale_exit_node: true
# You can advertise certain routes to the Tailscale network.
tailscale_advertise_routes:
- 10.0.0.0/24
- 10.0.1.0/24
# You can give hosts a specific name:
tailscale_hostname: some_hostname.example.com
```
The machine needs to be prepared. In CI this is done using [`molecule/default/prepare.yml`](https://github.com/robertdebock/ansible-role-tailscale/blob/master/molecule/default/prepare.yml):
```yaml
---
- name: Prepare
hosts: all
become: true
gather_facts: false
roles:
- role: robertdebock.bootstrap
```
Also see a [full explanation and example](https://robertdebock.nl/how-to-use-these-roles.html) on how to use these roles.
## [Role Variables](#role-variables)
The default values for the variables are set in [`defaults/main.yml`](https://github.com/robertdebock/ansible-role-tailscale/blob/master/defaults/main.yml):
```yaml
---
# defaults file for tailscale
# You can configure your tailscale node to act as an exit node.
# Enabling this, sets the required sysctl settings and adds a firewalld rule.
tailscale_exit_node: false
# To route traffice for certain subnets through tailscale, add them here.
tailscale_advertise_routes: []
# Nodes can authenticate with the tailscale service using an authkey.
# These keys can be created here: https://login.tailscale.com/admin/settings/keys
tailscale_authkey: ""
# You can specify a hostname.
tailscale_hostname: "{{ ansible_hostname }}"
# Whether to accept DNS settings from Tailscale. Set to false when using Pi-hole.
tailscale_accept_dns: true
# Whether to enable Tailscale SSH on this node.
tailscale_ssh: false
```
## [Requirements](#requirements)
- pip packages listed in [requirements.txt](https://github.com/robertdebock/ansible-role-tailscale/blob/master/requirements.txt).
## [State of used roles](#state-of-used-roles)
The following roles are used to prepare a system. You can prepare your system in another way.
| Requirement | GitHub | GitLab |
|-------------|--------|--------|
|[robertdebock.bootstrap](https://galaxy.ansible.com/robertdebock/bootstrap)|[](https://github.com/robertdebock/ansible-role-bootstrap/actions)|[](https://gitlab.com/robertdebock-iac/ansible-role-bootstrap)|
## [Context](#context)
This role is part of many compatible roles. Have a look at [the documentation of these roles](https://robertdebock.nl/) for further information.
Here is an overview of related roles:

## [Compatibility](#compatibility)
This role has been tested on these [container images](https://hub.docker.com/u/robertdebock):
|container|tags|
|---------|----|
|[Amazon](https://hub.docker.com/r/robertdebock/amazonlinux)|Candidate|
|[Debian](https://hub.docker.com/r/robertdebock/debian)|all|
|[EL](https://hub.docker.com/r/robertdebock/enterpriselinux)|9|
|[Fedora](https://hub.docker.com/r/robertdebock/fedora)|38, 39|
|[Ubuntu](https://hub.docker.com/r/robertdebock/ubuntu)|all|
The minimum version of Ansible required is 2.10, tests have been done on:
- The previous version.
- The current version.
- The development version.
If you find issues, please register them on [GitHub](https://github.com/robertdebock/ansible-role-tailscale/issues).
## [License](#license)
[Apache-2.0](https://github.com/robertdebock/ansible-role-tailscale/blob/master/LICENSE).
## [Author Information](#author-information)
[robertdebock](https://robertdebock.nl/)
Please consider [sponsoring me](https://github.com/sponsors/robertdebock).