Skip to content

Conversation

@pprometey
Copy link

@pprometey pprometey commented Jul 23, 2025

Pull Request: Add Uninstallation and Deregistration Support via state: absent

Summary

This PR adds full support for clean uninstallation and deregistration of ZeroTier nodes using the standard Ansible state variable.
By default, the role continues to install and configure ZeroTier as before.
If state: absent is set, the role will:

  • Leave the ZeroTier network (if joined)
  • Deauthorize and remove the node from ZeroTier Central via API (if API access is configured)
  • Uninstall the zerotier-one package and remove all related files

Details

  • Refactored tasks/main.yml to support both installation (state: present or unset) and uninstallation (state: absent) flows.
  • Added tasks for leaving the network, deauthorizing the node, and uninstalling/removing files.
  • Updated README.md with clear instructions and examples for using state: absent to remove ZeroTier from hosts.

Backward Compatibility

  • No breaking changes: if state is not set, the role behaves as before (installation/configuration).
  • Users can now manage the full ZeroTier lifecycle with a single role and a standard Ansible interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant