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

**URL:** <https://discuss.elastic.co/t/does-logstash-keystore-has-a-force-flag-or-a-quiet-flag/214575>\
**Category:** Logstash\
**Created:** [January 10, 2020, 9:31am UTC](https://discuss.elastic.co/t/does-logstash-keystore-has-a-force-flag-or-a-quiet-flag/214575 "2020-01-10T09:31:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![asp](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@asp](https://discuss.elastic.co/u/asp)\
**Post date:** [January 10, 2020, 9:31am UTC](https://discuss.elastic.co/t/does-logstash-keystore-has-a-force-flag-or-a-quiet-flag/214575/1 "2020-01-10T09:31:42Z")

</div>

Hi,

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
    shell:
      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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 7, 2020, 9:31am UTC](https://discuss.elastic.co/t/does-logstash-keystore-has-a-force-flag-or-a-quiet-flag/214575/2 "2020-02-07T09:31:47Z")

</div>

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