ansible/roles/desktop-zerotier/tasks/main.yml
2020-08-08 20:37:28 -05:00

31 lines
760 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: Join network
command:
argv:
- "zerotier-cli"
- "join"
- "{{ zerotier_network_id }}"
changed_when: no
become: yes