diff options
Diffstat (limited to 'roles/configure_static_routes')
5 files changed, 26 insertions, 14 deletions
diff --git a/roles/configure_static_routes/files/ffmyk-iproute.sh b/roles/configure_static_routes/files/ffmyk-iproute.sh index eb2f2fc..de56020 100755 --- a/roles/configure_static_routes/files/ffmyk-iproute.sh +++ b/roles/configure_static_routes/files/ffmyk-iproute.sh @@ -12,4 +12,5 @@ ip -4 rule add to 10.222.16.0/20 table ffmyk priority 10  ip -4 rule add to 10.222.32.0/19 table ffmyk priority 10  ip -4 rule add to 10.222.64.0/18 table ffmyk priority 10  ip -4 rule add to 10.222.128.0/17 table ffmyk priority 10 -ip -6 rule add to 2001:470:cd45:FF00::/56 table ffmyk priority 10 +ip -6 rule add to 2001:470:cd45:ff00::/56 table ffmyk priority 10 +ip -6 rule add to 2a03:2260:1016::/48 table ffmyk priority 10 diff --git a/roles/configure_static_routes/tasks/fastd_tasks.yml b/roles/configure_static_routes/tasks/fastd_tasks.yml new file mode 100644 index 0000000..4cd1583 --- /dev/null +++ b/roles/configure_static_routes/tasks/fastd_tasks.yml @@ -0,0 +1,14 @@ +--- +- name: copy site specific iproute up config script +  template: +      src: ffmyk-iproute-up.j2 +      dest: /usr/local/bin/ffmyk-iproute{{ item.name }}-up.sh +      mode: 0744 +  with_items: "{{ sites }}" + +- name: copy site specific iproute down config script +  template: +      src: ffmyk-iproute-down.j2 +      dest: /usr/local/bin/ffmyk-iproute{{ item.name }}-down.sh +      mode: 0744 +  with_items: "{{ sites }}" diff --git a/roles/configure_static_routes/tasks/main.yml b/roles/configure_static_routes/tasks/main.yml index e89d845..e37b598 100644 --- a/roles/configure_static_routes/tasks/main.yml +++ b/roles/configure_static_routes/tasks/main.yml @@ -4,25 +4,20 @@        path: /etc/iproute2/rt_tables        line: 42 ffmyk +- name: name ffrl routing table +  lineinfile: +      path: /etc/iproute2/rt_tables +      line: 47 ffrl +  when: "'ffrl_uplink' in group_names" +  - name: copy ffmyk iproute config script    copy:        src: ffmyk-iproute.sh        dest: /usr/local/bin/ffmyk-iproute.sh        mode: 0744 -- name: copy site specific iproute up config script -  template: -      src: ffmyk-iproute-up.j2 -      dest: /usr/local/bin/ffmyk-iproute{{ item.name }}-up.sh -      mode: 0744 -  with_items: "{{ sites }}" - -- name: copy site specific iproute down config script -  template: -      src: ffmyk-iproute-down.j2 -      dest: /usr/local/bin/ffmyk-iproute{{ item.name }}-down.sh -      mode: 0744 -  with_items: "{{ sites }}" +- include_tasks: fastd_tasks.yml +  when: "'fastd' in group_names"  - name: copy ffmyk iproute systemd service    copy: diff --git a/roles/configure_static_routes/templates/ffmyk-iproute-down.j2 b/roles/configure_static_routes/templates/ffmyk-iproute-down.j2 index ae50297..d551203 100644 --- a/roles/configure_static_routes/templates/ffmyk-iproute-down.j2 +++ b/roles/configure_static_routes/templates/ffmyk-iproute-down.j2 @@ -2,6 +2,7 @@  ip -4 route del {{item.net4 }} dev bat{{ item.name }} proto static table ffmyk  ip -6 route del {{item.net6 }} dev bat{{ item.name }} proto static table ffmyk +ip -6 route del {{item.site_net6 }} dev bat{{ item.name }} proto static table ffmyk  ip -4 rule del iif bat{{ item.name }} table ffmyk  ip -6 rule del iif bat{{ item.name }} table ffmyk diff --git a/roles/configure_static_routes/templates/ffmyk-iproute-up.j2 b/roles/configure_static_routes/templates/ffmyk-iproute-up.j2 index 47af244..29afdb9 100644 --- a/roles/configure_static_routes/templates/ffmyk-iproute-up.j2 +++ b/roles/configure_static_routes/templates/ffmyk-iproute-up.j2 @@ -10,3 +10,4 @@ ip -6 rule add from all iif bat{{ item.name }} type unreachable priority 200  ip -4 route replace {{item.net4 }} dev bat{{ item.name }} proto static table ffmyk  ip -6 route replace {{item.net6 }} dev bat{{ item.name }} proto static table ffmyk +ip -6 route replace {{item.site_net6 }} dev bat{{ item.name }} proto static table ffmyk  | 
