headscale
Ansible Role for Headscale
A role that installs and manages Headscale on Linux.
Requirements
- Ansible >= 7
Installation
ansible-galaxy install kazauwa.headscale
Role Variables
headscale_version
- Default:
0.22.3
- Description: version of Headscale to install. List of avaliable versions can be found on official releases page. Defaults to the latest avaliable.
- Default:
headscale_arch
- Default:
amd64
- Description: headscale binary target architecture.
- Default:
headscale_os
- Default:
linux
- Description: headscale binary target OS.
- Default:
headscale_user_name
- Default:
headscale
- Description: name for service user for running Headscale binary.
- Default:
headscale_user_group
- Default:
headscale
- Description: group for service user for running Headscale binary.
- Default:
headscale_user_uid
- Default:
800
- Description: uid for service user for running Headscale binary.
- Default:
headscale_user_gid
- Default:
800
- Description: gid for service user for running Headscale binary.
- Default:
headscale_binary_path
- Default:
/usr/local/bin/headscale
- Description: path for installing headscale binary.
- Default:
headscale_config_dir
- Default:
/etc/headscale
- Description: path to headscale configs.
- Default:
headscale_var_data_dir
- Default:
/var/lib/headscale
- Description: path to headscale data.
- Default:
headscale_pid_dir
- Default:
/var/run/headscale
- Description: path to headscale socket.
- Default:
headscale_config
- Default:
{}
- Description: yaml formatted headscale config, consider using default config as a starting point.
- Default:
headscale_config_template
- Default:
""
- Description: path to Jinja2 formatted headscale config template. If present, will override
headscale_config
.
- Default:
headscale_acl
- Default:
{}
- Description: yaml formatted ACL policies. Make sure that you've read the docs on how to use this feature.
- Default:
headscale_users
- Default:
[]
- Description: list of users to create, e.g. to use with tagOwners.
- Default:
headscale_enable_routes
- Default:
[]
- Description: list of nodes with advertised routes to enable. Accepts an integer id of headscale node, list of comma-separated routes and an optional comment to output during execution. Used when autoApprovers are not set.
- Example:
{'id': 14, 'routes': '10.0.0.0/24,10.2.3.4/32', 'comment': 'Gateway to prod'}
- Default:
headscale_exit_nodes
- Default:
[]
- Description: list of nodes acting as an exit node. Accepts an integer id of headscale node and an optional comment to output during execution. Used when autoApprovers are not set.
- Example:
{'id': 14, 'comment': 'eu-fra-01'}
- Default:
Dependencies
None.
Example Playbook
- hosts: all
roles:
- kazauwa.headscale
vars:
headscale_version: '0.22.3'
License
MIT