2017-10-11 06:52:24 +02:00
|
|
|
---
|
|
|
|
- name: write systemd unit ffmwu-static-routes.service
|
|
|
|
template:
|
|
|
|
src: ffmwu-static-routes.service.j2
|
|
|
|
dest: /etc/systemd/system/ffmwu-static-routes.service
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
notify: reload systemd
|
|
|
|
|
|
|
|
- name: write static route scripts
|
|
|
|
template:
|
|
|
|
src: "{{ item }}.j2"
|
|
|
|
dest: "/usr/local/bin/{{ item }}"
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0750
|
2018-09-16 12:38:33 +02:00
|
|
|
loop:
|
2017-10-11 06:52:24 +02:00
|
|
|
- ffmwu-add-static-routes.sh
|
|
|
|
- ffmwu-del-static-routes.sh
|
|
|
|
notify: restart systemd unit ffmwu-static-routes
|
|
|
|
|
|
|
|
- name: enable systemd unit ffmwu-static-routes.service
|
|
|
|
systemd:
|
|
|
|
name: ffmwu-static-routes
|
|
|
|
enabled: yes
|
|
|
|
state: started
|
|
|
|
|
2017-10-13 07:59:43 +02:00
|
|
|
- name: write systemd unit ffmwu-ip-rules.service
|
|
|
|
template:
|
|
|
|
src: ffmwu-ip-rules.service.j2
|
|
|
|
dest: /etc/systemd/system/ffmwu-ip-rules.service
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
notify: reload systemd
|
|
|
|
|
|
|
|
- name: write ip rule scripts
|
|
|
|
template:
|
|
|
|
src: "{{ item }}.j2"
|
|
|
|
dest: "/usr/local/bin/{{ item }}"
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0750
|
2018-09-16 12:38:33 +02:00
|
|
|
loop:
|
2017-10-13 07:59:43 +02:00
|
|
|
- ffmwu-add-ip-rules.sh
|
|
|
|
- ffmwu-del-ip-rules.sh
|
|
|
|
notify: restart systemd unit ffmwu-ip-rules
|
|
|
|
|
|
|
|
- name: enable systemd unit ffmwu-ip-rules.service
|
|
|
|
systemd:
|
|
|
|
name: ffmwu-ip-rules
|
|
|
|
enabled: yes
|
|
|
|
state: started
|
|
|
|
|
2018-09-09 10:26:23 +02:00
|
|
|
- name: set basic sysctl settings for routing
|
2017-10-11 06:52:24 +02:00
|
|
|
sysctl:
|
|
|
|
name: "{{ item.name }}"
|
|
|
|
value: "{{ item.value }}"
|
|
|
|
state: present
|
2018-09-16 12:38:33 +02:00
|
|
|
loop: "{{ sysctl_settings_routing_basic }}"
|
2018-09-09 10:26:23 +02:00
|
|
|
|
2019-03-22 21:52:08 +01:00
|
|
|
- name: set sysctl settings for ip forwarding
|
|
|
|
when: server_type == "gateway" or server_type == "mesh-service" or server_type == "monitoring"
|
2018-09-09 10:26:23 +02:00
|
|
|
sysctl:
|
|
|
|
name: "{{ item.name }}"
|
|
|
|
value: "{{ item.value }}"
|
|
|
|
state: present
|
2019-03-22 21:52:08 +01:00
|
|
|
loop: "{{ sysctl_settings_routing_forwarding }}"
|