diff options
Diffstat (limited to 'roles/router/tasks')
-rw-r--r-- | roles/router/tasks/main.yml | 10 | ||||
-rw-r--r-- | roles/router/tasks/tinc.yml | 35 |
2 files changed, 3 insertions, 42 deletions
diff --git a/roles/router/tasks/main.yml b/roles/router/tasks/main.yml index c319b4a..6ab944f 100644 --- a/roles/router/tasks/main.yml +++ b/roles/router/tasks/main.yml @@ -2,17 +2,10 @@ - name: Install routing software package: name: - - tinc - bird2 - iperf3 - mtr-tiny state: present -- name: Include tinc tasks - import_tasks: tinc.yml - when: - - tinc is defined - - tinc.configure is defined - - tinc.configure - name: Copy munin plugin copy: src: munin_bird @@ -20,3 +13,6 @@ mode: '0750' tags: - munin +- name: Apply tinc rule + import_role: + name: tinc diff --git a/roles/router/tasks/tinc.yml b/roles/router/tasks/tinc.yml deleted file mode 100644 index 2673a59..0000000 --- a/roles/router/tasks/tinc.yml +++ /dev/null @@ -1,35 +0,0 @@ ---- -- name: Ensure tinc directory exists - ansible.builtin.file: - path: '/etc/tinc/tn_int/' - state: directory - mode: '0750' -- name: Install tinc.conf template - template: - src: tinc.conf.j2 - dest: /etc/tinc/tn_int/tinc.conf - mode: '0750' - tags: - - tconfig -- name: Install tinc-up template - template: - src: tinc-up.j2 - dest: /etc/tinc/tn_int/tinc-up - mode: '0740' - tags: - - tconfig -- name: Copy remaining files - ansible.posix.synchronize: - src: tn_int/ - dest: /etc/tinc/tn_int/ - archive: false - recursive: true - times: true -- name: Make scripts executable - file: - path: "/etc/tinc/tn_int/{{ item }}" - mode: "0740" - with_items: - - tinc-down - tags: - - exec |