diff options
author | Lars Wirzenius <liw@liw.fi> | 2016-09-08 16:13:41 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2016-09-08 16:13:41 +0300 |
commit | 2b3efa623720cc06c8b09a101970630903b8a75b (patch) | |
tree | fff6eadc7f0338ac18b414f6eeb143ee40e365c1 | |
parent | e3cf8b710918536ea951a6064a340dbaa4dea3ad (diff) | |
download | minipc-router-2b3efa623720cc06c8b09a101970630903b8a75b.tar.gz |
Bring up eth1, eth2 on router box
-rw-r--r-- | ansible/roles/router/files/interfaces-eth1-eth2 | 11 | ||||
-rw-r--r-- | ansible/roles/router/tasks/main.yml | 8 |
2 files changed, 19 insertions, 0 deletions
diff --git a/ansible/roles/router/files/interfaces-eth1-eth2 b/ansible/roles/router/files/interfaces-eth1-eth2 new file mode 100644 index 0000000..ec57997 --- /dev/null +++ b/ansible/roles/router/files/interfaces-eth1-eth2 @@ -0,0 +1,11 @@ +auto eth1 +iface eth1 inet static + address 10.0.0.2 + netmask 255.255.255.0 + gateway 10.0.0.255 + +auto eth2 +iface eth2 inet static + address 10.0.0.3 + netmask 255.255.255.0 + gateway 10.0.0.255 diff --git a/ansible/roles/router/tasks/main.yml b/ansible/roles/router/tasks/main.yml index 3c95278..2bfaa99 100644 --- a/ansible/roles/router/tasks/main.yml +++ b/ansible/roles/router/tasks/main.yml @@ -14,6 +14,14 @@ name: ferm state: restarted +- name: configure eth1 and eth2 + copy: + src: interfaces-eth1-eth2 + dest: /etc/network/interfaces.d + +- name: bring up eth1 and eth2 + shell: ifup eth1 eth2 + - name: set up packet forwarding sysctl config copy: src: enable-routing.conf |