Does logstash-keystore has a force flag? Or a quiet flag?


I want to fill logstash-keystore via ansible and want to pipe the value via stdin. So I need to fill anything from stdin and need to avoid any readings from input during the run like "do you really want to overwrite?) ,...

Currently I am able to add new entries with following block:

  - name: keystore - add logstash user
      cmd: "echo {{ CRED_LOGSTASH_SYSTEM_USER }} | ./logstash-keystore --path.settings {{ logstash.path.config }}/config_sets/{{ CONFIG_SET_NAME }}/{{ item }} add LOGSTASH_USER"
      chdir: "/usr/share/logstash/bin"

But If I want to overwrite an entry keystore is asking if I want to overwrite.

-f / --force flag is at least not documented in usage information.

Can you please shed some light here?

Or is the only workaround to remove and add?

I find it really difficult that logstash, kibana and elasticsearch have keystore-feature and all are implemented with different shell interface and different function scope (only logstash has the possibility to secure the keystore with a password)...

Thanks, Andreas

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.