ansible-role-tinc/tasks/distribute.yml

14 lines
440 B
YAML
Raw Normal View History

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