-
-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Skip tailscale up command if you want (#73)
* Adds tailscale_up_skip variable Fixes #72 Starts an implementation for #64 but does not complete * Update dependabot python checks to weekly * Bump python in CI to python 3.9 * Remove traces of yamllint * Fixes #74 * Fix caching during CI workflow
- Loading branch information
Showing
18 changed files
with
331 additions
and
219 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,4 @@ updates: | |
- package-ecosystem: "pip" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
- name: Cleanup | ||
hosts: all | ||
tasks: | ||
- name: De-register Tailscale node | ||
become: yes | ||
command: tailscale down | ||
changed_when: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
- name: Converge | ||
hosts: all | ||
tasks: | ||
- name: "Include artis3n.tailscale" | ||
include_role: | ||
name: artis3n.tailscale | ||
vars: | ||
tailscale_up_skip: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
dependency: | ||
name: galaxy | ||
driver: | ||
name: docker | ||
lint: | | ||
set -e | ||
ansible-lint | ||
platforms: | ||
- name: instance | ||
image: ${MOLECULE_DISTRO:-ghcr.io/artis3n/docker-ubuntu2010-ansible:latest} | ||
# Needed for systemd | ||
command: ${MOLECULE_DOCKER_COMMAND:-/lib/systemd/systemd} | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup:ro | ||
privileged: true | ||
pre_build_image: true | ||
provisioner: | ||
name: ansible | ||
verifier: | ||
name: ansible | ||
scenario: | ||
name: skip-authentication | ||
test_sequence: | ||
- lint | ||
- destroy | ||
- syntax | ||
- create | ||
- converge | ||
- idempotence | ||
- verify | ||
- destroy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
- name: Verify | ||
hosts: all | ||
tasks: | ||
- name: Get Tailscale status | ||
become: yes | ||
command: tailscale status | ||
changed_when: false | ||
register: tailscale_status | ||
|
||
- name: Assertions | ||
assert: | ||
that: | ||
- '"hello.ipn.dev" not in tailscale_status.stdout' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,8 @@ | ||
--- | ||
|
||
- name: Arch | Install Dependencies | ||
- name: Arch | Install Tailscale | ||
become: yes | ||
pacman: | ||
name: '{{ arch_dependencies }}' | ||
name: '{{ tailscale_package }}' | ||
update_cache: yes | ||
state: present | ||
|
||
- name: Arch | Ensure non-root user | ||
become: yes | ||
user: | ||
name: tailscale | ||
home: /home/tailscale | ||
system: yes | ||
|
||
- name: Arch | Add tailscale user to sudoers | ||
become: yes | ||
lineinfile: | ||
path: /etc/sudoers | ||
regexp: '^tailscale' | ||
line: 'tailscale ALL=(ALL) NOPASSWD: ALL' | ||
|
||
- name: Arch | Download Tailscale AUR | ||
become: yes | ||
become_user: tailscale | ||
git: | ||
repo: https://aur.archlinux.org/tailscale.git | ||
dest: /home/tailscale/tailscale | ||
version: master | ||
|
||
- name: Arch | Install Tailscale | ||
become: yes | ||
become_user: tailscale | ||
command: makepkg -si --noconfirm | ||
args: | ||
chdir: /home/tailscale/tailscale | ||
creates: /usr/sbin/tailscale |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
|
||
# Whether to output debug information during role execution | ||
verbose: false | ||
tailscale_up_skip: false |