--- argument_specs: main: short_description: Install Tailscale and bring the node up description: - >- Asserts an Ubuntu host, optionally removes Tailscale first, installs the package from the upstream APT repository with the keyring pinned by sha256, sets the C(tailscaled) flags, enables C(tailscaled), runs C(tailscale up) when C(tailscale_up) is true and the backend state is not Running, and optionally updates the package to the APT candidate version. - Needs gathered facts. It owns no firewall rule. No Tailscale SSH flag and no ACL tag are set. options: tailscale_up: type: bool default: true description: - >- Runs C(tailscale up) when the backend state is not Running. C(tailscale_auth_key) must then be a non-empty string; this is asserted before any change. False installs and runs C(tailscaled) without joining a tailnet. tailscale_auth_key: type: str no_log: true description: - >- Auth key for C(tailscale up), handed over through a root-owned 0600 temporary file that is always removed afterwards. No default. Required, non-empty, when C(tailscale_up) is true and the node is not Running (or C(tailscale_remove) is true); otherwise not read. tailscale_update: type: bool default: false description: - Refreshes the APT cache and installs the package's candidate version, pinned as package=version. tailscale_remove: type: bool default: false description: - >- Logs out (best effort), stops and disables C(tailscaled), removes the package, the APT source list and the keyring, then installs and configures Tailscale again. tailscale_remove_data: type: bool default: false description: - Only used with C(tailscale_remove). Purges the package and deletes C(tailscale_state_dir). tailscale_userspace_networking: type: bool default: false description: - >- Adds C(--tun=userspace-networking) to C(FLAGS) in C(/etc/default/tailscaled) and restarts C(tailscaled), for hosts without C(/dev/net/tun). False removes that flag again. Other flags in C(FLAGS) are kept. tailscale_package: type: str default: tailscale description: - APT package installed, updated or removed. tailscale_apt_distribution: type: str default: ubuntu description: - Distribution directory of the Tailscale repository, used in C(tailscale_repo_url) and the source list comment. tailscale_apt_release: type: raw description: - >- Release codename of the repository suite and of the keyring file name. The role default is the Jinja expression C(ansible_facts['distribution_release']), the host's own release. tailscale_repo_url: type: raw description: - >- APT repository URL written to the source list. The role default is a Jinja expression built from C(tailscale_apt_distribution) (C(https://pkgs.tailscale.com/stable/ubuntu)). tailscale_keyring_url: type: raw description: - >- Download URL of the APT keyring. The role default is a Jinja expression built from C(tailscale_repo_url) and C(tailscale_apt_release) (C(https://pkgs.tailscale.com/stable/ubuntu/.noarmor.gpg)). tailscale_keyring_checksum: type: str default: 3e03dacf222698c60b8e2f990b809ca1b3e104de127767864284e6c228f1fb39 description: - >- sha256 (hex) of the keyring at C(tailscale_keyring_url). The download fails on a mismatch, so a rotated upstream key stops the install until the new key is checked and the hash updated. tailscale_keyring_path: type: path default: /usr/share/keyrings/tailscale-archive-keyring.gpg description: - Destination of the downloaded keyring. tailscale_apt_list_path: type: path default: /etc/apt/sources.list.d/tailscale.list description: - Destination of the APT source list. tailscale_state_dir: type: path default: /var/lib/tailscale description: - State directory of C(tailscaled), deleted when C(tailscale_remove_data) is true.