We have hardcoded permissions on hardcoded indices in our logstash_writer_role
file. At least the names of the indices need to be changed to a variable, preset with defaults.
We also need to check whether the role has the same permissions we have in the role. Either check for the role in Elasticsearch (better but way more complicated) or just check if the file we put on the host and write into the cluster has changed. A handler might do the trick.