Commit Graph

9 Commits (4dac8000fcfac782cc97b44021df163459be0d0e)

Author SHA1 Message Date
Marcus Meurs 4dac8000fc Variable naming convention
Updated 2 variable names to follow naming convention. For backwards compatibility the old names are rewritten to the new ones in the role's defaults.
2018-12-04 05:00:38 +01:00
Marcus Meurs 672c67e087 Reduce unnecessary API calls
The role will no longer make API calls to authorize already authorized members to a network.
2018-12-04 01:34:39 +01:00
Marcus Meurs c03c2b5a3f Set custom facts persistently
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.
2018-12-03 07:05:37 +01:00
Marcus Meurs f3c9d6d2d0 Drop privilege at block level
Apparently `local_action` and `delegate_to` handle `become: false` differently. The later ignored it when it was done at task level.
2018-12-01 05:56:20 +01:00
Gio d2c2e6494c
Make authentication delegation configurable
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...
2018-10-15 18:08:01 +02:00
Marcus Meurs 3de2e738d4 2 separate API calls
- authorize member
- configure member

This is a workaround for the issue described in #17
2018-07-25 23:19:47 +02:00
Marcus Meurs 31e25cb3f0 Make API call local_action
Having the controller talk to the ZeroTier API instead of connecting to the target hosts and make them do it is much faster.
2018-04-05 11:32:19 +02:00
Marcus Meurs 8f5f3c7181 Description option added
- Added description to API call. Defaults to empty string.
- Variable descriptoin and example added to readme
2018-04-05 01:32:16 +02:00
Andy Shinn f1cc5c4e49 somes fixups 2018-02-15 19:59:14 -06:00