adds tailscale
All checks were successful
Nix Format Check / check-format (pull_request) Successful in 39s
All checks were successful
Nix Format Check / check-format (pull_request) Successful in 39s
This commit is contained in:
parent
02c70010bd
commit
45bc0093aa
@ -5,6 +5,15 @@
|
||||
- name: Include symlinks tasks
|
||||
ansible.builtin.import_tasks: tasks/symlinks.yml
|
||||
|
||||
- name: Gather package facts
|
||||
ansible.builtin.package_facts:
|
||||
manager: auto
|
||||
become: true
|
||||
|
||||
- name: Include Tailscale tasks
|
||||
ansible.builtin.import_tasks: tasks/tailscale.yml
|
||||
become: true
|
||||
|
||||
- name: Include VSCode tasks
|
||||
ansible.builtin.import_tasks: tasks/vscode.yml
|
||||
when: hostname in ['mennos-laptop', 'mennos-desktop']
|
||||
@ -28,11 +37,6 @@
|
||||
ansible.builtin.import_tasks: tasks/docker.yml
|
||||
become: true
|
||||
|
||||
- name: Gather package facts
|
||||
ansible.builtin.package_facts:
|
||||
manager: auto
|
||||
become: true
|
||||
|
||||
- name: Include GNOME Extensions tasks
|
||||
ansible.builtin.import_tasks: tasks/gnome-extensions.yml
|
||||
|
||||
|
36
config/ansible/tasks/tailscale.yml
Normal file
36
config/ansible/tasks/tailscale.yml
Normal file
@ -0,0 +1,36 @@
|
||||
- name: Ensure Tailscale is installed
|
||||
ansible.builtin.package:
|
||||
name: tailscale
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- name: Check if Tailscale is installed
|
||||
ansible.builtin.command: tailscale
|
||||
register: tailscale_check
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
|
||||
- name: Install Tailscale
|
||||
ansible.builtin.command: tailscale up
|
||||
when: tailscale_check.rc != 0
|
||||
become: true
|
||||
|
||||
- name: Check if Tailscale is running
|
||||
ansible.builtin.command: tailscale status
|
||||
register: tailscale_status
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
|
||||
- name: Start tailscaled service
|
||||
ansible.builtin.systemd:
|
||||
name: tailscaled
|
||||
state: started
|
||||
enabled: yes
|
||||
daemon_reload: yes
|
||||
become: true
|
||||
|
||||
- name: Notify user to authenticate Tailscale
|
||||
ansible.builtin.debug:
|
||||
msg: "Please authenticate Tailscale by running: sudo tailscale up --operator=$USER"
|
||||
when: tailscale_status.rc != 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user