summaryrefslogtreecommitdiff
path: root/roles/setup_ffrl_tunnel/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/setup_ffrl_tunnel/tasks/main.yml')
-rw-r--r--roles/setup_ffrl_tunnel/tasks/main.yml36
1 files changed, 36 insertions, 0 deletions
diff --git a/roles/setup_ffrl_tunnel/tasks/main.yml b/roles/setup_ffrl_tunnel/tasks/main.yml
new file mode 100644
index 0000000..e22787f
--- /dev/null
+++ b/roles/setup_ffrl_tunnel/tasks/main.yml
@@ -0,0 +1,36 @@
+---
+- name: create netctl config
+ template:
+ src: netctl
+ dest: /etc/netctl/{{ item.name }}
+ with_items: "{{ ffrl_peers }}"
+ notify: reenable netctl
+
+- name: enable netctl config
+ command: netctl enable {{ item.name }}
+ args:
+ creates: /etc/systemd/system/netctl@{{ item.name }}.service
+ with_items: "{{ ffrl_peers }}"
+
+- name: start netctl config
+ systemd:
+ name: netctl@{{ item.name }}.service
+ state: started
+ with_items: "{{ ffrl_peers }}"
+
+- name: install bird
+ pacman:
+ name: bird
+ state: present
+
+- name: create bird config
+ template:
+ src: bird.conf
+ dest: /etc/bird.conf
+ notify: reload bird
+
+- name: start and enable bird
+ systemd:
+ name: bird.service
+ state: started
+ enabled: yes