mirror of
https://github.com/trailofbits/algo.git
synced 2025-09-03 10:33:13 +02:00
Handle existence of dummy interface after reboot
This commit is contained in:
parent
ed2e42964f
commit
4bf6deed38
3 changed files with 21 additions and 6 deletions
|
@ -15,10 +15,13 @@
|
||||||
ifconfig lo100 inet6 FCAA::1/64; echo $?
|
ifconfig lo100 inet6 FCAA::1/64; echo $?
|
||||||
|
|
||||||
- name: load dummy
|
- name: load dummy
|
||||||
shell: modprobe dummy
|
modprobe:
|
||||||
|
name: dummy
|
||||||
|
state: present
|
||||||
|
params: 'numdummies=2'
|
||||||
|
|
||||||
- name: add dummy
|
- name: add dummy
|
||||||
shell: ip link add dummy100 type dummy
|
shell: ip link add dummy1 type dummy || /bin/true
|
||||||
|
|
||||||
- name: restart dummy
|
- name: restart dummy
|
||||||
shell: ifdown --force dummy100 && ifup dummy100
|
shell: ifdown --force dummy1 && ifup dummy1
|
||||||
|
|
|
@ -44,6 +44,18 @@
|
||||||
tags:
|
tags:
|
||||||
- cloud
|
- cloud
|
||||||
|
|
||||||
|
- name: Use dummy module on startup
|
||||||
|
lineinfile: dest=/etc/modules-load.d/modules.conf line='dummy' state=present create=yes
|
||||||
|
tags:
|
||||||
|
- always
|
||||||
|
|
||||||
|
- name: Configure 2 dummies
|
||||||
|
lineinfile: dest=/etc/modprobe.d/dummy.conf line='options dummy numdummies=2' state=present create=yes
|
||||||
|
notify:
|
||||||
|
- load dummy
|
||||||
|
tags:
|
||||||
|
- always
|
||||||
|
|
||||||
- name: Dummy interface for services configured
|
- name: Dummy interface for services configured
|
||||||
template: src=10-dummy-services.cfg.j2 dest=/etc/network/interfaces.d/10-dummy-services.cfg
|
template: src=10-dummy-services.cfg.j2 dest=/etc/network/interfaces.d/10-dummy-services.cfg
|
||||||
notify:
|
notify:
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
auto dummy100
|
auto dummy1
|
||||||
iface dummy100 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 dummy100 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