molecule
molecule copied to clipboard
Add `--host` Option to Verify Sub-command to Target a Particular Platform
Issue Type
- Feature request
Molecule and Ansible details
ansible 2.7.0
python version = 2.7.15 (default, Aug 22 2018, 16:36:18) [GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.2)]
molecule, version 2.19.0
Molecule installation method (one of):
- pip
Ansible installation method (one of):
- source (via brew)
Desired Behavior
Add the ability to target a particular host for the verify sub-command. For instance:
molecule verify --host bionic
The UI would work the same way as the login subcommand currently works.
This issues has been brought up before in different format, but appears to have been denied because of lack of resources. As this would save me troubleshooting time, I try to put together a PR.
Some of the related issues are #1471, #916, and #300.
The UI would work the same way as the
loginsubcommand currently works.
Great, that makes sense to me.
but appears to have been denied because of lack of resources.
Most likely.
As this would save me troubleshooting time, I try to put together a PR.
yes please !
Is this still in the works? I can take ownership of this if need be
Go go go go go go go go @NerdsvilleCEO, will support any way I can.
@decentral1se Before I implement this, I saw a pattern where people make a scenario per base OS, is this an acceptable workaround or should we still add the host option, if it is worth adding I will add it
Correct, it is a strategy that is being used:
https://github.com/robertdebock/ansible-role-anaconda/tree/master/molecule
However, I know it is not the only strategy! For example, Molecule itself uses a "test case" style to group some scenarios. Feel free to implement if you need but this is not major priority. Come and chat on #ansible-molecule if you want to know what is on fire :)
This feature would be useful for almost all the CLI commands (not just verify).
Someone needs to make a PR about this. The real challenge is how to distinguish between platform-instances and sideload-instances, like a db instance that needs to present for the testing. Probably we could use some tags to mark what is a platform or not.
Do you think it would make sense to support --platform-name on all different targets? Currently, this only seems to be recognized on molecule test, but when developing / debugging tests, I'd like to run molecule create --platform-name=xxx and then later molecule converge --platform-name==xxx or molecule verify --platform-name=xxx multiple times.
My current workaround is to comment out all other platforms in my molecule.yml file, but that is cumbersome every time.
I'd be glad to create a dedicated issue if the maintainers think so.