ansible/roles/desktop-zerotier/tasks/main.yml
Salt 39078538c5 Wrench Zerotier timeouts down and hopefully solve the timeout issue in general
Was having issues with it stalling shutdowns. Hopefully it was just a unit misconfig, but I've no remorse in just killing some network daemon on shutdown
2020-09-30 16:50:15 -05:00

36 lines
916 B
YAML

#!/usr/bin/ansible-playbook
# vim:ft=ansible:
---
- name: Configure system packages
block:
- name: Add zerotier repo key
apt_key:
url: "https://raw.githubusercontent.com/zerotier/ZeroTierOne/master/doc/contact%40zerotier.com.gpg"
- name: Add repos
apt_repository:
repo: "{{ item }}"
loop:
# These repos work for Buster and >=19.10
- "deb http://download.zerotier.com/debian/buster buster main"
- name: Update APT cache
apt:
update_cache: yes
cache_valid_time: 86400
- name: Install packages
apt:
name:
- zerotier-one
- name: Template out unit
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
become: yes