ansible-role-tinc/tasks/distribute.yml

14 lines
408 B
YAML

---
# Tinc VPN Hostfile Distribution
- name: Distribute - Set different base dir for macOS
set_fact:
tinc_base_dir: /usr/local/etc/tinc
when: (override_os_family is defined) | ternary(override_os_family,ansible_os_family) == "Darwin"
- name: Distribute - Copy hostfiles to targets
become: yes
copy:
src: "{{ role_path }}/files/tmp/"
dest: "{{ tinc_base_dir }}/{{ tinc_vpn_id }}/hosts/"