Also removes the conditional for skipping installation based on ansible_local.zerotier value. Skipping tasks like that should be up to the user, not the role.
If ansible_distribution is Ubuntu the role will check if there is a dedicated repo matching the ansible_distribution_release. If this is not the case but the ansible_distribution_major_version is 18, the repo for the bionic release will be used.
Create /etc/ansible/facts.d/zerotier.fact on each node containing custom facts in json format. This can then be used to prevent pointless reconfiguration of existing nodes whenever a new one is added to the inventory. In this commit it merely skips the installation tasks.
Before this commit the authentication task was runned as a local_action
so if the zerotier controller was on a different machine that the
ansible controller, the zerotier controller API had to bind to 0.0.0.0
instead of 127.0.0.1 with the security implication this burden this
imply (setup HTTPS, setup firewall and so on).
With this commit this behaviour is now configurable with zerotier_api_delegate
variable, by default that variable is set to localhost so it behave
exactly as before this commit, but if set the action is run on the
preferred machine, in my case the zerotier network controller is part of
the same playbook so I set
zerotier_api_delegate: zerotierNetworkControllerMachineName
zerotier_api_url: http://127.0.0.1:9993/
So I can benefit from this ansible role without the burden of setting up
global listening + HTTPS etc...
Give the user an option to skip the installation tasks. There's no real need to download the pgp key and packages again when all you want to do is reconfigure existing members.