Ansible playbook to deploy Tailscale with SSH and Exit Node enabled on 1 or more machines. This is a great way to self-host your own VPN, but keep it easy for all of your devices. Exit Nodes can easily be switched in the Tailscale apps.
Supported operating systems:
- Debian / Ubuntu
- CentOS / RedHat
- Rocky Linux / AlmaLinux
- Amazon Linux 2023 / Amazon Linux 2
- Fedora
- Arch Linux
- OpenSUSE
- Oracle Linux
- Raspbian
- Clone this playbook with
git clone https://github.com/itsnebulalol/tailscale-deploy && cd tailscale-deploy
- Install Ansible
- Run
ansible-galaxy install -r requirements.yml --force
- Edit
hosts
with your server info, add as many servers as you need - Get a Tailscale auth key from here
- Run the playbook with
TAILSCALE_KEY="key goes here" ansible-playbook -i hosts main.yml
Lastly, enable Exit Node in the route settings in the Tailscale dashboard for the machine(s):
![image](https://private-user-images.githubusercontent.com/18669106/247794453-d79e875d-c454-4e79-90b1-4709ee0be0c5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE4NTczNTksIm5iZiI6MTcyMTg1NzA1OSwicGF0aCI6Ii8xODY2OTEwNi8yNDc3OTQ0NTMtZDc5ZTg3NWQtYzQ1NC00ZTc5LTkwYjEtNDcwOWVlMGJlMGM1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzI0VDIxMzczOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE1OTJmMGMwOWFlMzU2NjY2MjQ0YTY5Y2MyMjI4MWNmMjU4OTNhZDZjNDE5NGM2N2I1MzEzMzZhOGE1NWIyM2EmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.2AXt1Cvsks2YI6mWQTjRqWODPk-BUpV5-CtcEdm0jlA)
For more information, read here.
- Matrix Docker Ansible Deploy for
hosts
file and other references - artis3n for ansible-role-tailscale