Overrides unforutnately run after everything else
so it's by consequence that the first master node
which is the one that really needs the shell script
is the only one that has it executed on it at the right time
Extra Notes:
Brad's script is close, but the provider specifics he has are out of scope.
This is also hack and stems from the problem where we have to run ansible very last and also we need to modify the default route on VirtualBox because vagrant insists on making the first device always the NAT network, for which incoming connections aren't supported, and for which we rely on to reach the internet. In order to circumvent this, we need to both add another device, a public device, and remove the original route so that ansible's variable {{ ansible_default_ipv4 }} picks up the correct address that the other hosts can contact them with. This could probably be better solved in the playbook itself, but I don't like modifying the play to suit the testing suite as it seems antithetical to the purpose of testing. Unfortunately a lot of these environments, like vagrant, aren't forgiving when you need to do something complex in multiple different providers.
This contains a partial error in logic, in that the shell provisioner properly runs but only for all systems but the last. Vagrant deeply restricts where you can run certain things and overrides always run last in the loop, so there's zero way I could find to run overrides AND also a final provisioner for all hosts like ansible. At any rate, this works
Extra Notes:
Brad's script is close, but the provider specifics he has are out of scope. This is also hack and stems from the problem where we have to run ansible very last and also we need to modify the default route on VirtualBox because vagrant insists on making the first device always the NAT network, for which incoming connections aren't supported, and for which we rely on to reach the internet. In order to circumvent this, we need to both add another device, a public device, and remove the original route so that ansible's variable
{{ ansible_default_ipv4 }}
picks up the correct address that the other hosts can contact them with. This could probably be better solved in the playbook itself, but I don't like modifying the play to suit the testing suite as it seems antithetical to the purpose of testing. Unfortunately a lot of these environments, like vagrant, aren't forgiving when you need to do something complex in multiple different providers.This contains a partial error in logic, in that the shell provisioner properly runs but only for all systems but the last. Vagrant deeply restricts where you can run certain things and overrides always run last in the loop, so there's zero way I could find to run overrides AND also a final provisioner for all hosts like ansible. At any rate, this works