danpilch / easy-kubeadm

Setup a Kubernetes 1.18 cluster easily on CentOS 8.1 with Ansible
MIT License
29 stars 7 forks source link

Updated Vagrant file actually execute provider specifics #7

Closed xenithorb closed 7 years ago

xenithorb commented 7 years ago

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