ansible/roles/zerotier/tasks/main.yml

31 lines
760 B
YAML
Raw Normal View History

#!/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
2020-06-16 09:14:33 -05:00
- name: Join network
command:
argv:
- "zerotier-cli"
- "join"
- "{{ zerotier_network_id }}"
changed_when: no
become: yes