Ansible role to deploy Tailscale as docker containers, to have a VPN that keeps your web browsing secure while also letting you access any of your devices, no matter where you are
- Docker (must be installed on the target hosts)
ansible-galaxy install cornelcristea.tailscaleThe role uses the following variables:
| Name | Description | Default |
|---|---|---|
tailscale_accept_dns |
Enable DNS acceptance for tailscale subnet | false |
tailscale_advertise_routes |
List of subnet routes | (empty) |
tailscale_auth_key |
Authentication key used to connect the node to tailscale. Generated on the admin panel: https://login.tailscale.com/admin/settings/keys |
(empty) |
tailscale_hostname |
Hostname shown in the admin console | {{ ansible_hostname }} |
- name: Deploy Tailscale
hosts: servers
gather_facts: true
vars:
tailscale_auth_key: "encrypted-auth-key"
tailscale_advertise_routes:
- "192.168.1.0/24"
- "192.168.5.0/20"
tailscale_accept_dns: true
roles:
- cornelcristea.tailsclaeWe welcome contributions! Here’s how you can help improve this role:
-
Fork the repository
Click theForkbutton at the top of the repository. -
Clone your fork locally
git clone https://github.com/cornelcristea/ansible-role-tailscale.git
cd ansible-role-tailscale- Create a new branch
git checkout -b my-feature-branch- Make your changes following Ansible best practices.
- Add or update tests if applicable.
- Update the README for any new variables or features.
- Test your changes:
ansible-playbook -i test/inventory test/test.yml - Run molecule test:
molecule test- Commit and push your changes
git add .
git commit -m "Add feature XYZ"
git push origin my-feature-branch- Open a Pull Request (PR)
Submit a PR from your branch. Include a clear description of your changes and why they’re needed.
We appreciate your contributions!