[CODE] add tasks

This commit is contained in:
Jannik Beyerstedt 2019-11-03 16:27:52 +01:00
parent 54cffa0cdc
commit 1900ac0301
11 changed files with 203 additions and 3 deletions

13
tasks/distribute.yml Normal file
View file

@ -0,0 +1,13 @@
---
# 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/"