molecule icon indicating copy to clipboard operation
molecule copied to clipboard

Add `--host` Option to Verify Sub-command to Target a Particular Platform

Open rcuza opened this issue 6 years ago • 9 comments
trafficstars

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.

rcuza avatar Feb 07 '19 15:02 rcuza

The UI would work the same way as the login subcommand currently works.

Great, that makes sense to me.

but appears to have been denied because of lack of resources.

Most likely.

decentral1se avatar Feb 07 '19 22:02 decentral1se

As this would save me troubleshooting time, I try to put together a PR.

yes please !

themr0c avatar Feb 20 '19 15:02 themr0c

Is this still in the works? I can take ownership of this if need be

thatnerdjosh avatar Oct 11 '19 21:10 thatnerdjosh

Go go go go go go go go @NerdsvilleCEO, will support any way I can.

decentral1se avatar Oct 12 '19 12:10 decentral1se

@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

thatnerdjosh avatar Oct 14 '19 19:10 thatnerdjosh

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 :)

decentral1se avatar Oct 14 '19 19:10 decentral1se

This feature would be useful for almost all the CLI commands (not just verify).

mconigliaro avatar Feb 08 '20 19:02 mconigliaro

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.

ssbarnea avatar Feb 08 '20 20:02 ssbarnea

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.

dlouzan avatar Dec 16 '22 13:12 dlouzan