Setup-passwords from ansible script

Hey,

I'd like to automate my cluster provisionning (ansible). I am stucked on the password setup. How can I set my elastic, kibana and logstash passwords from a script, without prompting? I don't want to use the setup-password auto because I want to decide for my passwords.

I'd like to pass them as a parameter or as stdin

Hi Olivier,

setup-password is not meant to be scriptable or used as part of a deployment script. It basically wraps a number of calls to the _password API and you should do the same in your ansible playbook.

@TimV has written some useful instructions here on how to make use of the API and the bootstrap.password that might come in handy

OK, switching to this thread

thank's

Hi Olivier,

The official ansible-elasticsearch playbook also handles it by making requests directly to the _password api.

1 Like

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