ansible-role-zerotier/README.md

55 lines
2.0 KiB
Markdown
Raw Normal View History

2017-07-27 00:21:35 +00:00
[![Build Status](https://travis-ci.org/m4rcu5nl/ansible-role-zerotier.svg?branch=master)](https://travis-ci.org/m4rcu5nl/ansible-role-zerotier) [![GitHub issues](https://img.shields.io/github/issues/m4rcu5nl/ansible-role-zerotier.svg)](https://github.com/m4rcu5nl/ansible-role-zerotier/issues)
2018-02-16 01:59:14 +00:00
ZeroTier
2017-07-26 21:34:38 +00:00
=========
2018-02-16 01:59:14 +00:00
This Ansible role installs the `zerotier-one` package, adds and authorizes new members to (existing) ZeroTier networks, and tells the new member to join the network.
2017-07-26 21:34:38 +00:00
Requirements
------------
2018-02-16 01:59:14 +00:00
This role has an optional access token variable to authorize the member using the ZeroTier API. The role also takes the ID of the ZeroTier network to automatically join the new member.
2017-07-26 21:34:38 +00:00
Role Variables
--------------
### zerotier_api_url
2018-02-16 01:59:14 +00:00
The url where the Zerotier API lives. Must use HTTPS protocol.
2017-07-26 23:58:44 +00:00
Default: https://my.zerotier.com
2017-07-26 21:34:38 +00:00
### zerotier_accesstoken
2018-02-16 01:59:14 +00:00
The access token needed to authorize with the ZeroTier API. You can generate one in your account settings at https://my.zerotier.com/. If this is left out then the newly joined member will not be automatically authorized.
2017-07-26 21:34:38 +00:00
2018-02-16 01:59:14 +00:00
### zerotier_network_id
The 16 character network ID of the network the new members should join. The node will not join any network if omitted.
### zerotier_register_short_hostname
Used to register the short hostname (without the FQDN) on the network instead of the long one.
Default: `false`
### zerotier_member_ip_assignments
A list of IP addresses to assign this member. The member will be automatically assigned an address on the network if left out.
2017-07-26 21:34:38 +00:00
Example Playbook
----------------
```yaml
2017-07-26 21:34:38 +00:00
- hosts: servers
2017-07-26 23:58:44 +00:00
vars:
zerotier_network_id: 1234567890qwerty
zerotier_accesstoken: "{{ vault_zerotier_accesstoken }}"
zerotier_register_short_hostname: true
2017-07-26 21:34:38 +00:00
roles:
2017-07-26 23:58:44 +00:00
- { role: m4rcu5nl.zerotier }
```
Example Inventory
----------------
```INI
[servers]
web1.example.com zerotier_member_ip_assignments='["192.168.195.1", "192.168.195.2", "192.168.195.3"]'
db1.example.com zerotier_member_ip_assignments='["192.168.195.10"]'
```