Created
November 30, 2018 13:50
-
-
Save jonashackt/dbfc9b4715ba642244a08870b943e9cc to your computer and use it in GitHub Desktop.
Molecule: define host_vars or group_vars in provisioner/inventory that are really used by Molecule´s platform
This file contains hidden or 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
# Roles which require host/groups to have certain variables set | |
# see (scroll down!) https://molecule.readthedocs.io/en/latest/configuration.html#provisioner & https://github.com/ansible/molecule/issues/1037 | |
# like: | |
provisioner: | |
name: ansible | |
... | |
inventory: | |
host_vars: | |
docker-debian-stretch: | |
gitlab_domain: "localhost" | |
# Molecule uses the name of the Platform to create an inventory host name | |
# you have to do nothing, if you chooce the same name there (& host_vars in provisioner) like this: | |
platforms: | |
- name: docker-debian-stretch | |
... | |
# if you use group_vars under inventory, you have to define groups also under Platforms: | |
# see https://molecule.readthedocs.io/en/latest/configuration.html#platforms | |
platforms: | |
- name: docker-debian-stretch | |
groups: | |
- other-name-then-docker-debian-stretch | |
# but now you can´t re-use the nice platform name - so just stay with host_vars :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment