Skip to content

Commit

Permalink
Fix non-batch password reset breaking Ansible
Browse files Browse the repository at this point in the history
  • Loading branch information
chvancooten authored Sep 19, 2022
1 parent fd1cf1c commit 9fbe65d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Ansible/roles/elastic_server/files/set-password-elastic.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Reset the password
NEW_PASSWORD=$(echo y | /usr/share/elasticsearch/bin/elasticsearch-reset-password -u elastic | sed -n 's/^New value: \(.*\)$/\1/p')
curl -X POST --insecure --user elastic:$NEW_PASSWORD https://localhost:9200/_security/user/elastic/_password -H 'Content-Type: application/json' -d "{ \"password\" : \"$1\" }"
NEW_PASSWORD=$(echo y | /usr/share/elasticsearch/bin/elasticsearch-reset-password --batch -u elastic | sed -n 's/^New value: \(.*\)$/\1/p')
curl -X POST --insecure --user elastic:$NEW_PASSWORD https://localhost:9200/_security/user/elastic/_password -H 'Content-Type: application/json' -d "{ \"password\" : \"$1\" }"

0 comments on commit 9fbe65d

Please sign in to comment.