fuzzymistborn.headscale
Headscale Installer and Setup
This is an Ansible role that helps you install and set up headscale. Much of the inspiration and configuration options come from @kazauwa, but I've changed the binary installation method because I prefer it.
You can install it using ansible-galaxy install fuzzymistborn.headscale
.
Features
- Install and set up the
headscale
binary. - Copy or update the
headscale
configuration file. - Automatically update the binaries if a new version is available (unless a specific version is set).
Configuration
This role has several variables you can customize.
You can set a specific version to install using headscale_pinned_ver
. By default, the role fetches and installs the latest version available. It will check for updates every time the role is run. If you want to stop automatic updates and use a specific version, you can set it like this:
headscale_download_latest_ver: false
headscale_pinned_ver: 0.16.1
By doing this, the update command won’t run, and a new version will only be installed if it doesn’t match the pinned version.
You can set the headscale configuration in YAML format. Check out the default config to get started.
I recommend not changing other variables like headscale_gh_url
and headscale_install_directory
, unless you want to customize the installation.
To find the right version for your installation, check the release pages for headscale.
Github API
This role uses the GitHub API to find the latest available release. By default, it uses unauthenticated requests, which are limited by GitHub to 60 requests per hour based on your IP address. For most cases, this won’t be a problem, but you may hit the request limit. If you authenticate, you can increase this to 5,000 requests per hour.
To authenticate, you will need a Personal Access Token. You don’t need to select any scopes for the token. Then, add these variables:
github_api_user: fuzzymistborn
github_api_pass: YOUR_TOKEN
github_api_auth: yes
That’s all you need to do!