forked from ansible-community/molecule-vagrant
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pass --provider to vagrant when provider name specified
Currently, vagrant is still choosing the provider to use on its own liking. This may cause troubles like VM memory/cpus or provider options ignored if the provider use is not the one specified. See: - ansible-community#174 - https://github.com/ansible-community/molecule-vagrant/issues/181 So, pass --provider when the provider is set in the molecule.yml. If the test doesn't care about the provider, it should remove the provider name setting in the molecule.yml. Note: While this may break some setup, I believe this will prevent new reports/issues like the one previously noted. In case one molecule.yml file for multiple providers is wanted, use the new providers_options, as done in our CI scenario. Signed-off-by: Arnaud Patard <[email protected]>
- Loading branch information
Showing
5 changed files
with
47 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
molecule_vagrant/test/scenarios/molecule/invalid_provider/converge.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
- name: Converge | ||
hosts: all | ||
gather_facts: false | ||
become: true | ||
tasks: | ||
- name: Sample task # noqa command-instead-of-shell | ||
ansible.builtin.shell: | ||
cmd: uname | ||
warn: false | ||
changed_when: false |
12 changes: 12 additions & 0 deletions
12
molecule_vagrant/test/scenarios/molecule/invalid_provider/molecule.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
dependency: | ||
name: galaxy | ||
driver: | ||
name: vagrant | ||
provider: | ||
name: vmware | ||
force_provider: true | ||
platforms: | ||
- name: instance | ||
provisioner: | ||
name: ansible |