summaryrefslogtreecommitdiff
path: root/roles/router/tasks/tinc.yml
diff options
context:
space:
mode:
authoruvok cheetah2023-08-20 12:05:53 +0200
committeruvok cheetah2023-08-20 12:05:53 +0200
commit2b2d2627e345ad2829184c009ad4ed827d39124f (patch)
tree9ffc3849f48e3413a6b80b2adb8fc6fb47385c1d /roles/router/tasks/tinc.yml
parent88acccaf3136f5a106a3e16626571ab7c4936302 (diff)
Add ansible tinc config
Diffstat (limited to 'roles/router/tasks/tinc.yml')
-rw-r--r--roles/router/tasks/tinc.yml29
1 files changed, 29 insertions, 0 deletions
diff --git a/roles/router/tasks/tinc.yml b/roles/router/tasks/tinc.yml
new file mode 100644
index 0000000..ee16b0a
--- /dev/null
+++ b/roles/router/tasks/tinc.yml
@@ -0,0 +1,29 @@
+- name: Ensure tinc directory exists
+ ansible.builtin.file:
+ path: '/etc/tinc/tn_int/'
+ state: directory
+- name: Install tinc.conf template
+ template:
+ src: tinc.conf.j2
+ dest: /etc/tinc/tn_int/tinc.conf
+ tags:
+ - tconfig
+- name: Install tinc-up template
+ template:
+ src: tinc-up.j2
+ dest: /etc/tinc/tn_int/tinc-up
+ tags:
+ - tconfig
+- name: Copy remaining files
+ ansible.builtin.copy:
+ src: tn_int/
+ dest: /etc/tinc/tn_int/
+- name: Make scripts executable
+ file:
+ path: "/etc/tinc/tn_int/{{ item }}"
+ mode: "0740"
+ with_items:
+ - tinc-up
+ - tinc-down
+ tags:
+ - exec