As I noted on an early message – I’m working on some riak related roles for galaxy – a number of the roles do some similar operations – setting up some repositories, doing some simple configurations, etc.
Is it better to contain those common operations in a common role and have the other roles I’m making depend on it? Or should the roles be fully self-contained?
I’d argue that having a common role would be the approach to take, with follow-on roles having a dependency on the common role. For ease of maintenance, that’s the way to go. I don’t think in-depth standards for Galaxy roles has been discussed yet, at least not that I’ve heard (and not on this topic). Since “common” roles to be a standard practice amongst most Ansible users, their use in Galaxy should be appropriate.
I’d argue that having a common role would be the approach to take, with follow-on roles having a dependency on the common role. For ease of maintenance, that’s the way to go. I don’t think in-depth standards for Galaxy roles has been discussed yet, at least not that I’ve heard (and not on this topic). Since “common” roles to be a standard practice amongst most Ansible users, their use in Galaxy should be appropriate.
–Paul
If they’re common to all of the roles you’re writing, best to make the common part a role of its own and use the dependency system we have in place. Just be sure that when you’re listing the deps, that you do so in the “username.rolename” format so that galaxy will properly link them as dependencies when downloaded with the ansible-galaxy command line tool.
Totally fine with that.
Yeah FWIW, something like “riak-common” would be good for Galaxy, I think, or even maybe “basho-common”, but I’d avoid naming a role just “common” and making a miscellaneous bucket. Just because people might not be clear that username.common was really username-appcommon.
But I think we’re on the same page.
Sidenote: I want a future upgrade of Galaxy to auto-rename any role starting with “ansible-” or “ansible_” as it’s breaking sorting.
But we don’t really have a ton of standards.
Another thing I’m thinking is if a role contains a module it might be nice to show that on the module page, so you’d know what you might be getting into maintaining