Tailscale - include note on using tailscale in other qubes

This commit is contained in:
unman 2025-04-11 14:15:50 +00:00
parent 0b90a08bb2
commit 3c4a5602a8
No known key found for this signature in database
GPG Key ID: FDD1B8244731B36C
2 changed files with 9 additions and 90 deletions

View File

@ -34,9 +34,6 @@ The tailscaled service is disabled and amked in the template.
## Qube creation
`create.sls` is a standard way of creating `sys-tailscale` - qvm.present is used to create the qube, and preferences and features are set.
Note the use of an include statement at the head of the file. This allows a single state execution to call other states.
## Qube configuratioon
```
sudo qubesctl --skip-dom0 --targets=sys-tailscale state.apply tailscale.configure
@ -44,3 +41,12 @@ sudo qubesctl --skip-dom0 --targets=sys-tailscale state.apply tailscale.configur
Changes to `/rw/config/rc.local` are written using `file.append` to start tailscaled and bring up Tailscale.
To make sure that configuration changes are kept after a qubes restart, [bind-dirs](https://www.qubes-os.org/doc/bind-dirs/) is used.
The configuration file is created using `file.managed`
## Installing to existing templates, and existing qubes.
You can add Tailscale to an existing template:
`sudo qubesctl --skip-dom0 --show-output --targets=TEMPLATE_NAME state.apply tailscale.install`
You can add the service to an existing qube, where Tailscale is installed in the base template:
`sudo qubesctl --skip-dom0 --show-output --targets=QUBE_NAME state.apply tailscale.configure`
If the qube is running, restart it after configuration is complete.

View File

@ -1,87 +0,0 @@
# vim: set syntax=yaml ts=2 sw=2 sts=2 et :
#
#
#
{% if salt['pillar.get']('update_proxy:caching') %}
{% set proxy = 'cacher' %}
{% endif %}
{% if grains['nodename'] != 'dom0' %}
{% if grains['os_family']|lower == 'debian' %}
{% if grains['nodename']|lower != 'host' %}
{% if proxy == 'cacher' %}
{% for repo in salt['file.find']('/etc/apt/sources.list.d/', name='*list') %}
{{ repo }}_baseurl:
file.replace:
- name: {{ repo }}
- pattern: 'https://'
- repl: 'http://HTTPS///'
- flags: [ 'IGNORECASE', 'MULTILINE' ]
- backup: False
{% endfor %}
/etc/apt/sources.list:
file.replace:
- name: /etc/apt/sources.list
- pattern: 'https:'
- repl: 'http://HTTPS/'
- flags: [ 'IGNORECASE', 'MULTILINE' ]
- backup: False
{% endif %}
requirements_installed:
pkg.installed:
- refresh: True
- pkgs:
- qubes-core-agent-networking
- qubes-core-agent-passwordless-root
- iproute2
- libnotify-bin
- lsb-release
- xz-utils
/etc/apt/sources.list.d/tailscale.list:
file.managed:
- source:
- salt://tailscale/tailscale.list
- user: root
- group: root
- makedirs: True
/usr/share/keyrings/tailscale-achive-keyring.gpg:
file.managed:
- source:
- salt://tailscale/tailscale-archive-keyring.gpg
- user: root
- group: root
- makedirs: True
{% if proxy == 'cacher' %}
/etc/apt/sources.list.d/tailscale.list:
file.replace:
- name: /etc/apt/sources.list.d/tailscale.list
- pattern: 'https:'
- repl: 'http://HTTPS/'
- flags: [ 'IGNORECASE', 'MULTILINE' ]
- backup: False
{% endif %}
tailscale_installed:
pkg.installed:
- refresh: True
- pkgs:
- tailscale
{% endif %}
disable_tailscaled:
service.disabled:
- name: tailscaled
mask_tailscaled:
service.masked:
- name: tailscaled