Skip to content
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

[FEAT] Support setting custom IP addresses #419

Open
ben-z opened this issue Jan 21, 2024 · 3 comments
Open

[FEAT] Support setting custom IP addresses #419

ben-z opened this issue Jan 21, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@ben-z
Copy link

ben-z commented Jan 21, 2024

Is your feature request related to a problem? Please describe.
The IP address of devices are auto-generated when using tailscale up. This makes it difficult to achieve infrastructure-as-code.

Describe the solution you'd like
Tailscale allows us to specify custom IP addresses (blog post, api endpoint). It would be awesome if this Ansible role can support this.

Describe alternatives you've considered
Using this role for tailscale up, then using a custom script to set the IP via the API.

Additional context
N/A

@ben-z ben-z added the enhancement New feature or request label Jan 21, 2024
@artis3n
Copy link
Owner

artis3n commented Jan 21, 2024

This works today following the node attribute configuration of that blog post - set a tag:X in the node attribute policy and use the tailscale_tags argument of this role to apply that tag to nodes managed by this role.

image

What alternate behavior/use case are you looking for from this role?

@ben-z
Copy link
Author

ben-z commented Jan 25, 2024

Interesting! Didn't know about this before. I'd like to assign a static IP address to each machine. I guess I could use IP pools of /32 but then it seems as complex as doing a custom API call separately.

I was hoping that this role can take in a static IP and call the POST /api/v2/device/{deviceID}/ip for me. But it's not too complex to issue an API request in a custom role. It seems that this role does everything through the CLI and doesn't interact with the API. Please feel free to close this issue if this is not a feature that you'd like to include in the role.

@artis3n
Copy link
Owner

artis3n commented Jan 25, 2024

Hmm, yeah I would put this under the (growing) use cases of admin console API calls which are out of scope of this role, but suggest I should probably get around to converting this role into a collection and adding roles and plugins into the collection for these API use cases. This role I want to keep focused on behavior that can be configured on a node itself (e.g. the CLI).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants