Ensure eth1 comes up

These roles assume a working eth1.  Vagrant is notorious brining
up interfaces on RHEL/CentOS instances.  The shell provisioner
will execute before the dependant ansible provisioner.
This commit is contained in:
John Dewey 2017-02-16 11:45:21 -08:00
parent b84cc14694
commit 7521c16522
No known key found for this signature in database
GPG key ID: 85CA6C7BD56CF2EB

1
Vagrantfile vendored
View file

@ -106,6 +106,7 @@ Vagrant.configure("2") do |config|
# Only execute once the Ansible provisioner, # Only execute once the Ansible provisioner,
# when all the machines are up and ready. # when all the machines are up and ready.
if i == $num_instances if i == $num_instances
config.vm.provision :shell, inline: "ifup eth1", privileged: true
config.vm.provision "ansible" do |ansible| config.vm.provision "ansible" do |ansible|
ansible.playbook = "cluster.yml" ansible.playbook = "cluster.yml"
if File.exist?(File.join(File.dirname($inventory), "hosts")) if File.exist?(File.join(File.dirname($inventory), "hosts"))