basho-labs / ansible-riak

Ansible roles for Riak
Other
33 stars 32 forks source link

Redundant riak.conf copy? #80

Closed lucafavatella closed 7 years ago

lucafavatella commented 7 years ago

As new Riak KV versions are released, I am not confident of the files embedded in the role under directories files and templates. In particular, I understand the riak.conf file is already included in the packages hence, rather than embedding a Jinja2-templated-copy of that, Ansible modules e.g. lineinfile may be used for editing in-place /etc/riak/riak.conf. In this way, users wanting to perform custom changes to /etc/riak/riak.conf can do that knowing that as long as the line regexps are different ansible-riak will not overwrite those changes.

Do you understand as well that riak.conf.j2 could be deleted from the role replacing it with in-place editing where needed? And do you plan / accept contributions in this direction?

christophermancini commented 7 years ago

So, the issue with lineinfile is that its much harder to ensure your role is idempotent. With the template module, idempotency is ensured. Also, the template module has built in backup functionality saving a step for us.

The template that ships with the role is really just a basic template with sane defaults. The role allows you to provide your own template, overriding the one included with the role which is what we do for client library integration testing. Most power users I expect are already using this feature.

lucafavatella commented 7 years ago

It makes sense. Closing this then.

lucafavatella commented 7 years ago

Thanks.