Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vagrant: Improve network interfaces support #102

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

apatard
Copy link
Member

@apatard apatard commented Feb 15, 2023

Current code doesn't ensure that the network name is valid. According to current Vagrant documentation, it can only be:

  • public_network
  • private_network
  • forwarded_port

Moreover, the same documentation is saying that public network configuration may be reduced to:

config.vm.network "public_network"

So add needed code to support interfaces without any options.

On the test side:

  • modify the network test to check that the generated Vagrantfile is correct when no option is specified
  • add a test to ensure invalid network name are caught.

Fixes: #99

@apatard apatard force-pushed the vagrant_improve_interfaces branch 2 times, most recently from adb1b96 to cfbf530 Compare March 21, 2023 11:06
@apatard apatard added the enhancement New feature or request label Mar 21, 2023
@apatard apatard force-pushed the vagrant_improve_interfaces branch from cfbf530 to 83cbd1b Compare April 12, 2023 09:26
@apatard apatard force-pushed the vagrant_improve_interfaces branch from 83cbd1b to 9c9ef27 Compare April 28, 2023 13:15
Current code doesn't ensure that the network name is valid. According
to current Vagrant documentation, it can only be:
- public_network
- private_network
- forwarded_port

Moreover, the same documentation is saying that public network configuration
may be reduced to:

config.vm.network "public_network"

So add needed code to support interfaces without any options.

On the test side:
- modify the network test to check that the generated Vagrantfile is correct
when no option is specified
- add a test to ensure invalid network name are caught.

Fixes: ansible-community#99
Signed-off-by: Arnaud Patard <[email protected]>
@apatard apatard force-pushed the vagrant_improve_interfaces branch from ff29149 to 8be3b3e Compare June 26, 2023 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request vagrant
Projects
None yet
Development

Successfully merging this pull request may close these issues.

molecule-vagrant: Improve network handling
2 participants