An error message show when importing a collection:
Error Message: role has invalid name: 'robertdebock.molecule', expecting name to contain only lowercase alphanumeric characters or '_'
I'm not certain if the import checks requirements.yml or the actually installed roles.
Having a period in seems like a valid case.
mazer buildYou can also see the results here:
https://galaxy.ansible.com/my-imports/4003?type=collection
The collection would be available.
See error above.
Cool that collections are now available guys!
@robertdebock do you have a link to the collection code that I can look at?
That's a valid error coming from the importer. Content items (e.g. roles) must have Python compatible names.
There may be some confusion regarding how to reference the molecule role in an Ansible Playbook. There's an example here that might help: https://galaxy.ansible.com/docs/mazer/examples.html#using-collections-in-playbooks
Oh, for some reason my brain read module name as molecule not robertdebock.molecule
Cool, renamed the roles from robertdebock.{{ role_name }} to {{ role_name }}. Works.
Hm, some roles include other roles.
In this example the role lives in Galaxy in the traditional way of publishing a role, under `robertdebock.{{ role_name }}.
The role is also used in the collection, where I'd need to call the role using a different name. That would mean I'd have to use two different version of the same role.
@robertdebock I think if a role included in a collection depends on another role, it should also be included in the collection or in a second collection listed as a dependency. Collection dependencies have to be other collections, not via old-style Role content on Galaxy.
@ironfroggy okay, did not think of that, good suggestion.
Here is a situation that I can't solve:
I've got roles that depend on other roles. So the repository of role contains meta/main.yml:
# Many items omitted
dependencies:
- robertdebock.role_a
Using ansible-galaxy install -r roles/requirements.yml will download listed roles in requirements.yml _and their dependencies_ listed meta/main.yml. Which contain{{ namespace }}.{{ role_name }}`.
You can see the behaviour in this ansible_collection_rundeck. The role robertdebock.common depends on robertdebock.reboot.
Hope this help clarify the situation a bit.