Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Vagrant yaml removal #87

Merged
merged 3 commits into from
Dec 12, 2020

Conversation

apatard
Copy link
Member

@apatard apatard commented Dec 2, 2020

molecule_vagrant/modules/vagrant.py: Kill vagrant.yml

Using a vagrant.yml file to store the instance configuration
is adding an useless overhead and make things harder to debug.

While moving the Vagrantfile generation to use only jinja2 templating,
remove the hardcoded vagrant provider handling, since only vmware
providers are different (cpu and memory are 'vmx['numvcpus']' and
vmx['memsize']).

The new way of generating vagrant configuration will also ease to
improve the multiplatform support.

Notes:
- special vagrant-vbguest handling with virtualvbox provider removed
- to remain "bug" compatible for now, things like nic_model_type: '"e1000"'
  are still working, even if the new way is nic_model_type: e1000 (or "e1000").
  This will maybe vanish with multiplatform, since it'll probably introduce
  breakage due to different module arguments.

Fixes: #86
Signed-off-by: Arnaud Patard <apatard@hupstream.com>

@apatard
Copy link
Member Author

apatard commented Dec 9, 2020

finally found time to run the testsuite locally with libvirt on centos8/buster/bionic/fedora32 and the testsuite is passing so, I guess, it's time to get some review and try to merge this.

@apatard apatard marked this pull request as ready for review December 9, 2020 09:53
@apatard apatard requested a review from ssbarnea December 9, 2020 09:53
…tion

After generating the Vagrantfile and vagrant.yml files, run 'vagrant validate'
in order to detect syntax errors before trying to start/stop/... the VM.
Unfortunately, the python vagrant binding doesn't support calling 'validate',
so do it by hand with subprocess.

Signed-off-by: Arnaud Patard <apatard@hupstream.com>
Using a vagrant.yml file to store the instance configuration
is adding an useless overhead and make things harder to debug.

While moving the Vagrantfile generation to use only jinja2 templating,
remove the hardcoded vagrant provider handling, since only vmware
providers are different (cpu and memory are 'vmx['numvcpus']' and
vmx['memsize']).

The new way of generating vagrant configuration will also ease to
improve the multiplatform support.

Notes:
- special vagrant-vbguest handling with virtualvbox provider removed
- to remain "bug" compatible for now, things like nic_model_type: '"e1000"'
  are still working, even if the new way is nic_model_type: e1000 (or "e1000").
  This will maybe vanish with multiplatform, since it'll probably introduce
  breakage due to different module arguments.

Fixes: ansible-community#86
Signed-off-by: Arnaud Patard <apatard@hupstream.com>
With the vagrant.yml removal, it's now possible to remove the extra
quotes ("'e1000'" vs "e1000"/e1000) so update the README and testsuite
to reflect that.

Signed-off-by: Arnaud Patard <apatard@hupstream.com>
@apatard
Copy link
Member Author

apatard commented Dec 10, 2020

recheck

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants