ansible/roles/zerotier/tasks/main.yml

19 lines
679 B
YAML
Raw Normal View History

2020-11-08 01:34:05 -06:00
#!/usr/bin/env ansible-playbook
# vim:ft=ansible:
---
- name: ensure zerotier repo key
apt_key: url=https://raw.githubusercontent.com/zerotier/ZeroTierOne/master/doc/contact%40zerotier.com.gpg
- name: ensure zerotier repo
apt_repository: repo="deb http://download.zerotier.com/debian/buster buster main"
- name: update apt cache
apt: update_cache=yes cache_valid_time=86400
- name: ensure packages
apt: name=zerotier-one
- name: template unit file
template: src=zerotier-one.service dest=/etc/systemd/system/zerotier-one.service
notify: restart zerotier
- name: join network
command:
argv: [ zerotier-cli, join, "{{ zerotier_network_id }}" ]
changed_when: no