which one to release, modules or roles ?

Hi Team,

We are planning to automate/manage the softwares on our proprietary server. like installing, start, stop, delete the software’s.
we have wrote set of custom modules to do so.

Now we have 2 options to release,

  1. Release the modules for our end user, so that he can write a playbook(s) appropriate for his environment
  2. create set of Roles and release it to them.

Request you to share your thoughts on, which option is better ? and what is the widely used option in the industry ?

Thanks in advance.

Regards,
Senthil

I think creating roles and releasing them on ansible galaxy might suit you well.

While having modules included in ansible is great, unless the modules are useful to many people, it can be hard to find users to test them, review the code and get it included in ansible.

If you release your roles on ansible galaxy you retain control over your release cycle, so you can make new versions available at the same time as new versions of your software become available. Ansible releases only a few times a year so you may have a long wait before your modules become available to users.

Also, roles can show how best to use your modules together - module documentation only really allows for simple examples.

Roles can easily be installed by your users using ‘ansible-galaxy import’ command

I hope this helps,

Jon

Just to clarify, modules can be embedded in roles[1] it doesn't need to me included in Ansible upstream.

[1] https://docs.ansible.com/ansible/2.5/user_guide/playbooks_reuse_roles.html#embedding-modules-and-plugins-in-roles

Thanks for the quick reply, Jon. the modules we developed may not be useful for other people, as these are specific to our server.

Thanks a lot, Kai.