master
..
rw-r--r--
484 B
rw-r--r--
989 B
rw-r--r--
783 B
rw-r--r--
20 B
rw-r--r--
292 B

Vagrant-Ansible Static Public IP

Due to Vagrant’s VirtualBox provider’s inability to have a public network with a static ip address, this simple ansible playbook and example Vagrantfile does the setup after inital config (provisioning in vagrant speak).

Works on any target linux virtual machine with iproute2

Configuration (Vagrantfile):

  • set address: 0.0.0.0/24 to desired static address and subnet mask
  • set device: ethX to desired interface name to configure:w