molecule: Multiple platforms support (--platform option not working)
$ molecule --version
1.5.1
I would assume that Molecule would run molecule test
for each platform listed in platforms but that doesn’t seem to be the case. Below is my molecule.yml
file.
vagrant:
raw_config_args:
- "ssh.insert_key = false"
platforms:
- name: trusty64
box: ubuntu/trusty64
- name: precise64
box: ubuntu/precise64
providers:
- name: virtualbox
type: virtualbox
options:
memory: 1024
cpus: 2
instances:
- name: s1
options:
append_platform_to_hostname: no
When running molecule test
:
Only trusty64
platform is tested in Vagrant. I would expect Molecule to run tests for each platform listed in platforms
.
When running molecule test --platform=precise64
:
Still trusty64 is being used… --platform
option doesn’t change behaviour.
Bringing machine 's1' up with 'virtualbox' provider...
==> s1: Cloning VM...
==> s1: Matching MAC address for NAT networking...
==> s1: Checking if box 'ubuntu/trusty64' is up to date...
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 3
- Comments: 18 (15 by maintainers)
Commits related to this issue
- Fixed passing flags to molecule test * Fixes #199 — committed to ansible/molecule by deleted user 8 years ago
- Fixed passing flags to molecule test * Fixes #199 — committed to ansible/molecule by deleted user 8 years ago
- Update and fix serverspec for all platforms * serverspec now works with `molecule test --platform all` * Greatly simplified logic for targeting hosts with serverspec * Added inventory file in yml for... — committed to ansible/molecule by deleted user 8 years ago
- Update and fix serverspec for all platforms * serverspec now works with `molecule test --platform all` * Greatly simplified logic for targeting hosts with serverspec * Added inventory file in yml for... — committed to ansible/molecule by deleted user 8 years ago
- Update and fix serverspec for all platforms * serverspec now works with `molecule test --platform all` * Greatly simplified logic for targeting hosts with serverspec * Added instances w/groups to sta... — committed to ansible/molecule by deleted user 8 years ago
- Update and fix serverspec for all platforms * serverspec now works with `molecule test --platform all` * Greatly simplified logic for targeting hosts with serverspec * Added instances w/groups to sta... — committed to ansible/molecule by deleted user 8 years ago
- Update and fix serverspec for all platforms (#287) * Update and fix serverspec for all platforms * serverspec now works with `molecule test --platform all` * Greatly simplified logic for targetin... — committed to ansible/molecule by deleted user 8 years ago
- Revert "- Latest (1.6.2) version of Molecule works fine for me, removing pin to 1.4.2" until https://github.com/metacloud/molecule/issues/199 is resolved. This reverts commit 738406b97867eb532df8c9ad... — committed to adarnimrod/ansible-desktop-playbooks by adarnimrod 8 years ago
I am confused.
--platform
argument is ignored when runningmodule test
.all
option which tangentially addresses first part of the title.Why was this closed?
The issue described (
--platform
ignored when runningtest
) is still a problem in current 1.7.0.Ditching the
--platform
flag would be a substantial change, and might surprise folks unnecessarily. It would also contradict the approach in #147, requiring that we instead default to appending platforms to hostname (which is test-kitchen’s approach).At the risk of sounding overly cautious, I’d say let’s support a magic
--platform=all
var as a first step in migrating away from the single-platform-only approach Molecule currently espouses. If folks still find that too problematic, we can rather simply update it to be even more similar to test-kitchen, but I don’t think that’s necessary right now.