-
Notifications
You must be signed in to change notification settings - Fork 665
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
Allow randomness in instance names or use instance IDs #887
Comments
molecule.yml can accept env vars. Just have your CI system use a wrapper script which can generate a random name and set RANDOM_NAME prior to executing molecule.
|
Ah cool, I was not aware of this feature. I think this should work for my use cased. Will test this today. |
Tested this with version 1.25 and the OpenStack driver. But the variable is not replaced, I receive $VARNAME in the instance name. |
Ah, yeah. Molecule expands the env vars when the config is parsed. However, the Ansible playbook is loading the file off disk. I have an idea. Once I land #894 I'll fix this. |
I feel like the names should be internally randomized by molecule in first run and remembered (as you already do in file Using non-deterministic IDs is currently unusable, since on each command the instance name is different and you cannot target already created machine. My workaround for this is using "$HOSTNAME" in the instance name, but this is not 100% bulletproof I guess. |
@retr0h what do you mean by
?
and several platforms as
So, where should I inject generation of |
Issue Type
Current Behaviour
At the moment it is possible to specify the used OpenStack instance names in the configuration. The problem is that those names are unique. This way it is not possible to run the same configuration multiple times. In my CI I want to use the same configuration to run in parallel to be able to kickoff multiple jobs in parallel and to run Ansible 2.2 and Ansible 2.3 tests in parallel.
Desired Behaviour
It should be possible to use one configuration in parallel.
The text was updated successfully, but these errors were encountered: