Replace quotations for passwords with special characters#285
Replace quotations for passwords with special characters#285
Conversation
|
I haven't tested, but is there a reason not to use Something like this might work - name: Set bootstrap password
ansible.builtin.command: /usr/share/elasticsearch/bin/elasticsearch-keystore add -x 'bootstrap.password'
args:
stdin: {{ elasticsearch_bootstrap_pw }}
when: "'bootstrap.password' not in elasticsearch_keystore.stdout_lines" |
To be honest, I don't see a reason. Maybe the contributer back then had an idea I do not recognize. I guess, in the current implementation, command should be fine and make things even faster. In the long term, it might be a good idea to replace these tasks with a custom module, though. |
|
@ivareri I guess it was that the original contributor (like me) didn't think of the possibility to implement it with I still think this would fit into another PR so not to change too many things at once. Maybe a module would be even better. |
Using special characters like
$in some passwords breaks the role. This PR introduces a test (by setting passwords with special characters) and introduces a fix to handle them correctly.fixes #282