-
-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update existing tailscale installation if up command-line arguments change #115
Comments
Can maintain a statefile on the target host similar to https://github.com/artis3n/ansible-role-jetbrains-projector/blob/main/tasks/lib/update_configs.yml |
I'm just looking at implementing this as I probably want it before I implement subnet routes, but I have a question. According to the CLI manual:
Now, if we use the method laid out here we should be able to know if any arguments have been removed. So, if an argument has been removed, would we expect the new command to include an empty |
I hadn't considered that yet! In the spirit of Ansible (idempotency, explicit declarations) I'd prefer this role have the capability to realize if a previously set flag is missing and fail the task with a clear failure message explaining what flags are missing. And the user would need to explicitly pass an input variable to allow overwriting the state without including previously declared flags. The user would otherwise need to include the empty flags in their Perhaps an assert similar to https://github.com/artis3n/ansible-role-jetbrains-projector/blob/main/tasks/lib/validate.yml which is looped from https://github.com/artis3n/ansible-role-jetbrains-projector/blob/main/tasks/main.yml. Happy to let you tinker with an implementation for this issue! Feel free to put up a draft PR if you'd like input while you work on it. |
My previous comment creates idempotency challenges running the same playbook twice in a row so we'd need to solve for that. |
I've pushed a PR with initial support for this functionality. I've adjusted my previous comments to this behavior - let |
This role will update Tailscale to the latest version but will only run
up
if it detects the system is logged out of Tailscale. It should support an idempotent method of re-runningtailscale up
if the command-line arguments to theup
command change.The text was updated successfully, but these errors were encountered: