Replies: 3 comments 12 replies
-
Why not use a naming convention like the collections in ansible-collections:
|
Beta Was this translation helpful? Give feedback.
-
Hi! I think these repositories should keep "collection" in their names, to better differentiate them from the ones that are not ansible collections like
As for the link between the repositories names and installed collections paths, I think the key is to rely on ansible-galaxy and not git submodules. That way, repositories names could be anything and collections paths wouldn't be impacted. Example of collections:
- name: https://github.com/TOSIT-IO/tdp-collection.git
type: git
version: 0.0.1 # branch or tag or commit
- name: https://github.com/TOSIT-IO/tdp-collection-extras.git
type: git
version: 0.0.1 # branch or tag or commit
- name: https://github.com/TOSIT-IO/tdp-collection-prerequisites.git
type: git
version: 0.0.1 # branch or tag or commit Which after installation (
So if we edited each namespace: tdp
# tdp-collection/galaxy.yml
name: core
# tdp-collection-prerequisites/galaxy.yml
name: prerequisites
# tdp-collection-extras/galaxy.yml
name: extras It would generate :
So importing playbooks would look like : name: tdp.core.hadoop.datanode
name: tdp.prerequisites.system If you want tosit to be mentioned, you can change the namespaces to
name: tosit_tdp.core.hadoop.datanode
name: tosit_tdp.prerequisites.system If you still want to use git submodules in Hope that wasn't off topic, have a nive day! PS: I initially voted to rename tdp-collection to tdp-core then changed my mind but the poll is now closed. |
Beta Was this translation helpful? Give feedback.
-
Conclusions:To resume the discussion and @jusstol explanation. I think there's 3 different topics Topics - Polls:
"Ansible-galaxy or git submodules" should the first separate poll, and if you agree I will open that. Regarding the next topics i'll resume their content: Repository names:Option by @jusstol: Argument
Option by @gonzaloetjo: Argument
Option by @Nuttymoon:
Option by 2 @gonzaloetjo:
Folder treePossible thanks to tags and galaxy according to @jusstol: Option 1:
Option 2:
Option 3:
Option 4:
|
Beta Was this translation helpful? Give feedback.
-
Context
We have 3 repositories with
collection
in the name:We named them that because they are repositories with an Ansible collection.
Problem
When adding the collection to an Ansible collection directory, we remove the
collection
word and replace-
by_
. For example in getting started https://github.com/TOSIT-IO/tdp-getting-started/tree/b82ee024ec1215f5441e53a46cf0b5df982cd859/ansible_collections/tosit.We remove the word
collection
in order to call playbook withtosit.tdp.xxx.yyy
as we see here https://github.com/TOSIT-IO/tdp-collection/blob/290d4b63e39d850c1a63c373a351ea4ffda630b1/playbooks/hdfs_datanode_install.yml#L12.Proposition
For consistency, we should remove the
collection
word from our repositories name.For
tdp-collection
, a repositorytdp
will conflict with our TDP repository so we should add a suffix.10 votes ·
Beta Was this translation helpful? Give feedback.
All reactions