This repository was archived by the owner on Nov 6, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 7 files changed +180
-128
lines changed
Expand file tree Collapse file tree 7 files changed +180
-128
lines changed Original file line number Diff line number Diff line change @@ -4,10 +4,10 @@ name: CI Tests
44on :
55 pull_request :
66 branches :
7- - master
7+ - main
88 push :
99 branches :
10- - master
10+ - main
1111
1212jobs :
1313 molecule :
2525 - geerlingguy/docker-debian10-ansible:latest
2626 - geerlingguy/docker-debian9-ansible:latest
2727 - geerlingguy/docker-fedora31-ansible:latest
28+ - artis3n/docker-arch-ansible:latest
2829 fail-fast : false
2930
3031 steps :
Original file line number Diff line number Diff line change 11---
2+
3+ - name : Tailscale Status
4+ listen : Confirm Tailscale is Connected
5+ command : tailscale status
6+ register : handlers_tailscale_status
7+
8+ - name : Assert Tailscale is Connected
9+ listen : Confirm Tailscale is Connected
10+ assert :
11+ that :
12+ - handlers_tailscale_status.stdout | length != 0
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ galaxy_info:
1414 - eoan
1515 - bionic
1616 - xenial
17+ - focal
1718 - name : EL
1819 versions :
1920 - 7
@@ -28,6 +29,9 @@ galaxy_info:
2829 - name : Fedora
2930 versions :
3031 - 31
32+ - name : ArchLinux
33+ versions :
34+ - any
3135
3236 galaxy_tags :
3337 - tailscale
Original file line number Diff line number Diff line change 44 tasks :
55 - name : Get Tailscale status
66 become : yes
7- command : tailscale up
7+ command : tailscale status
88 changed_when : false
99 register : tailscale_status
1010
1111 - name : Assertions
1212 assert :
1313 that :
14- - tailscale_status.stderr == "\ntailscaled is authenticated, nothing more to do."
14+ - tailscale_status.stdout | length != 0
Original file line number Diff line number Diff line change 1+ ---
2+
3+ - name : Ensure non-root user
4+ become : yes
5+ user :
6+ name : tailscale
7+ home : /home/tailscale
8+ system : yes
9+
10+ - name : Add tailscale user to sudoers
11+ become : yes
12+ lineinfile :
13+ path : /etc/sudoers
14+ regexp : ' ^tailscale'
15+ line : ' tailscale ALL=(ALL) NOPASSWD: ALL'
16+
17+ - name : Download Tailscale AUR
18+ become : yes
19+ become_user : tailscale
20+ git :
21+ repo : https://aur.archlinux.org/tailscale.git
22+ dest : /home/tailscale/tailscale
23+ version : master
24+
25+ - name : Install Tailscale
26+ become : yes
27+ become_user : tailscale
28+ command : makepkg -si --noconfirm
29+ args :
30+ chdir : /home/tailscale/tailscale
31+ creates : /usr/sbin/tailscale
Original file line number Diff line number Diff line change 2727 when : ansible_distribution == 'Fedora'
2828 include_tasks : fedora.yml
2929
30+ - name : Arch
31+ when : ansible_distribution == 'Archlinux'
32+ include_tasks : arch.yml
33+
3034- name : Enable Service
3135 become : yes
3236 service :
3337 name : " {{ tailscale_service }}"
3438 state : started
3539 enabled : yes
3640
41+ - name : Check if Tailscale is connected
42+ command : tailscale status
43+ changed_when : false
44+ register : tailscale_status
45+
3746- name : Bring Tailscale Up
3847 become : yes
3948 # The command module cannot use | ; &
4251 # Since the auth key is included in this task, we do not want to log output
4352 no_log : true
4453 register : tailscale_start
45- changed_when : tailscale_start.stderr != "\ntailscaled is authenticated, nothing more to do."
54+ when : tailscale_status.stdout | length == 0
55+ notify : Confirm Tailscale is Connected
You can’t perform that action at this time.
0 commit comments