Skip to content

Commit

Permalink
Fix authkey existence check (#133)
Browse files Browse the repository at this point in the history
* Fix tailscale_auth_key existence check for empty string

* Fix debug messages for authkey and branch stability
  • Loading branch information
artis3n authored Aug 31, 2021
1 parent 3e4fd07 commit e1c0a81
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 54 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ codespaces-install:
clean:
pipenv --rm

.PHONY: update
update:
pipenv update
pipenv run pre-commit autoupdate

.PHONY: test
test:
CI_TAILSCALE_AUTH_KEY=$$(cat .ci-vault-pass) pipenv run molecule test --all
Expand Down
118 changes: 66 additions & 52 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
fail:
msg: >
You must include a Node Authorization auth key.
Set a `tailscale_auth_key` ansible-vault encrypted variable.
Set a `tailscale_auth_key` variable.
You can create this key from: https://login.tailscale.com/admin/authkeys.
when: tailscale_auth_key == None and not tailscale_up_skip | bool
when:
- not tailscale_auth_key or tailscale_auth_key == None
- not tailscale_up_skip | bool

- name: Skipping Authentication
debug:
Expand All @@ -16,9 +18,11 @@
# Print an error message to the console but proceed anyway
fail:
msg: >
!!!!!
Installing Tailscale from the unstable branch.
This is bleeding edge and may have issues.
Be warned.
!!!!!
when: release_stability | lower == 'unstable'
failed_when: false

Expand Down

0 comments on commit e1c0a81

Please sign in to comment.