ansible/playbooks/zerotier.yml
2021-08-07 17:14:28 -05:00

16 lines
399 B
YAML
Executable File

#!/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 ]