Provision dockerbox in Vagrant and setup network

This commit is contained in:
2020-06-23 21:59:47 -04:00
parent d276c3dc2b
commit c8b7821eb3
7 changed files with 51 additions and 11 deletions

View File

@@ -0,0 +1,10 @@
# Ansible managed
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback

View File

@@ -3,14 +3,24 @@
name: ["vim", "wget"]
state: present
- name: Install network interfaces file
copy:
src: network-interfaces.cfg
dest: /etc/network/interfaces
owner: root
group: root
mode: '0644'
when: manage_network
- name: Install network interfaces
template:
src: "{{ network_type }}-interface.cfg"
dest: /etc/network/interfaces
dest: "/etc/network/interfaces.d/{{ ip_inter }}"
notify: reboot_host
when: manage_network
- name: Install bridge utilities
apt:
name: bridge-utils
state: present
when: network_type == "bridged"
when: network_type == "bridged" and manage_network

View File

@@ -1,9 +1,5 @@
# {{ ansible_managed }}
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto br1
iface br1 inet static

View File

@@ -1,9 +1,5 @@
# {{ ansible_managed }}
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto {{ ip_inter }}
iface {{ ip_inter }} inet static