summaryrefslogtreecommitdiff
path: root/roles/uvok_bird
diff options
context:
space:
mode:
Diffstat (limited to 'roles/uvok_bird')
-rw-r--r--roles/uvok_bird/tasks/main.yml19
-rw-r--r--roles/uvok_bird/vars/main.yml1
2 files changed, 20 insertions, 0 deletions
diff --git a/roles/uvok_bird/tasks/main.yml b/roles/uvok_bird/tasks/main.yml
index 942ad06..db9c64f 100644
--- a/roles/uvok_bird/tasks/main.yml
+++ b/roles/uvok_bird/tasks/main.yml
@@ -1,5 +1,24 @@
---
# tasks file for uvok_bird
+- name: Ensure route/table definitions exists
+ ansible.builtin.file:
+ path: '{{ uvok_bird_route_file }}'
+ state: touch
+ mode: '0750'
+ owner: 'root'
+ group: 'root'
+- name: Add route/table definitions
+ lineinfile:
+ path: '{{ uvok_bird_route_file }}'
+ state: present
+ search_string: "150"
+ line: "150\tas{{ uvok_bird_opts.clear_as }}"
+- name: Add route/table definitions
+ lineinfile:
+ path: '{{ uvok_bird_route_file }}'
+ state: present
+ search_string: "100"
+ line: "100\tas{{ uvok_bird_opts.clear_as }}_out"
- name: Install routing software
package:
name:
diff --git a/roles/uvok_bird/vars/main.yml b/roles/uvok_bird/vars/main.yml
index f543c41..d28fa23 100644
--- a/roles/uvok_bird/vars/main.yml
+++ b/roles/uvok_bird/vars/main.yml
@@ -1,2 +1,3 @@
---
# vars file for uvok_bird
+uvok_bird_route_file: '/etc/iproute2/rt_tables.d/myas.conf'