mirror of
https://github.com/trailofbits/algo.git
synced 2025-09-03 10:33:13 +02:00
Merge 4bf6deed38
into ba7859ba5f
This commit is contained in:
commit
31d5aae8bf
3 changed files with 38 additions and 13 deletions
|
@ -7,12 +7,21 @@
|
||||||
- name: flush routing cache
|
- name: flush routing cache
|
||||||
shell: echo 1 > /proc/sys/net/ipv4/route/flush
|
shell: echo 1 > /proc/sys/net/ipv4/route/flush
|
||||||
|
|
||||||
- name: restart loopback
|
|
||||||
shell: ifdown lo:100 && ifup lo:100
|
|
||||||
|
|
||||||
- name: restart loopback bsd
|
- name: restart loopback bsd
|
||||||
shell: >
|
shell: >
|
||||||
ifconfig lo100 destroy || true &&
|
ifconfig lo100 destroy || true &&
|
||||||
ifconfig lo100 create &&
|
ifconfig lo100 create &&
|
||||||
ifconfig lo100 inet {{ local_service_ip }} netmask 255.255.255.255 &&
|
ifconfig lo100 inet {{ local_service_ip }} netmask 255.255.255.255 &&
|
||||||
ifconfig lo100 inet6 FCAA::1/64; echo $?
|
ifconfig lo100 inet6 FCAA::1/64; echo $?
|
||||||
|
|
||||||
|
- name: load dummy
|
||||||
|
modprobe:
|
||||||
|
name: dummy
|
||||||
|
state: present
|
||||||
|
params: 'numdummies=2'
|
||||||
|
|
||||||
|
- name: add dummy
|
||||||
|
shell: ip link add dummy1 type dummy || /bin/true
|
||||||
|
|
||||||
|
- name: restart dummy
|
||||||
|
shell: ifdown --force dummy1 && ifup dummy1
|
||||||
|
|
|
@ -44,17 +44,33 @@
|
||||||
tags:
|
tags:
|
||||||
- cloud
|
- cloud
|
||||||
|
|
||||||
- name: Loopback for services configured
|
- name: Use dummy module on startup
|
||||||
template: src=10-loopback-services.cfg.j2 dest=/etc/network/interfaces.d/10-loopback-services.cfg
|
lineinfile: dest=/etc/modules-load.d/modules.conf line='dummy' state=present create=yes
|
||||||
notify:
|
|
||||||
- restart loopback
|
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
- name: Loopback included into the network config
|
- name: Configure 2 dummies
|
||||||
lineinfile: dest=/etc/network/interfaces line='source /etc/network/interfaces.d/10-loopback-services.cfg' state=present
|
lineinfile: dest=/etc/modprobe.d/dummy.conf line='options dummy numdummies=2' state=present create=yes
|
||||||
notify:
|
notify:
|
||||||
- restart loopback
|
- load dummy
|
||||||
|
tags:
|
||||||
|
- always
|
||||||
|
|
||||||
|
- name: Dummy interface for services configured
|
||||||
|
template: src=10-dummy-services.cfg.j2 dest=/etc/network/interfaces.d/10-dummy-services.cfg
|
||||||
|
notify:
|
||||||
|
- load dummy
|
||||||
|
- add dummy
|
||||||
|
- restart dummy
|
||||||
|
tags:
|
||||||
|
- always
|
||||||
|
|
||||||
|
- name: Dummy interface included into the network config
|
||||||
|
lineinfile: dest=/etc/network/interfaces line='source /etc/network/interfaces.d/10-dummy-services.cfg' state=present
|
||||||
|
notify:
|
||||||
|
- load dummy
|
||||||
|
- add dummy
|
||||||
|
- restart dummy
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
auto lo:100
|
auto dummy1
|
||||||
iface lo:100 inet static
|
iface dummy1 inet static
|
||||||
address {{ local_service_ip }}
|
address {{ local_service_ip }}
|
||||||
netmask 255.255.255.255
|
netmask 255.255.255.255
|
||||||
|
|
||||||
iface lo:100 inet6 static
|
iface dummy1 inet6 static
|
||||||
address FCAA::1
|
address FCAA::1
|
||||||
netmask 64
|
netmask 64
|
||||||
autoconf 0
|
autoconf 0
|
Loading…
Add table
Reference in a new issue