Modularize zerotier as well

This commit is contained in:
Salt 2021-08-07 17:14:28 -05:00
parent 759df2f593
commit d68e3430a8
3 changed files with 15 additions and 5 deletions

View File

@ -25,8 +25,6 @@
tags: [ desktop, udev ]
- role: pulseaudio
tags: [ desktop, pulse, pulseaudio ]
- role: zerotier
tags: [ desktop, zerotier ]
- hosts: lap-s76-lemp9-0.desu.ltd
roles:
- role: desktop

View File

@ -3,9 +3,6 @@
---
# General configuration
- hosts: tags_pis
roles:
- role: zerotier
tags: [ pis, zerotier ]
tasks:
- name: install basic packages
apt:

15
playbooks/zerotier.yml Executable file
View File

@ -0,0 +1,15 @@
#!/usr/bin/env ansible-playbook
# vim:ft=ansible:
---
- hosts: tags_zerotier
roles:
- role: zerotier
tags: [ zerotier ]
- hosts: all
tasks:
- name: disable zerotier when not tagged
systemd: name={{ item }} state=stopped enabled=no
with_items:
- zerotier-one.service
when: "'tags_zerotier' not in group_names and item in services"
tags: [ zerotier ]