Page MenuHomePhabricator
Paste P4372

new-es-password.sh
ActivePublic

Authored by bd808 on Nov 4 2016, 6:45 PM.
#!/bin/sh
# Ugly script to generate password data
# for the Tool Labs elasticsearch cluster
set -e
PASS=$(openssl rand -base64 32)
SHA512=$(printf $PASS | mkpasswd --stdin --method=sha-512)
echo -e "${1} elasticsearch.ini\n----"
echo -e "user=${1} \npassword=${PASS}"
echo -e "----\n"
echo -e "${1} puppet master private (hieradata/labs/tools/common.yaml)\n----"
echo "profile::toolforge::elasticsearch::haproxy::elastic_users:"
echo " - name: '${1}'"
echo " password: '${SHA512}'"

Event Timeline

bd808 created this paste.Nov 4 2016, 6:45 PM
bd808 edited the content of this paste. (Show Details)Nov 4 2016, 9:46 PM
JHedden edited the content of this paste. (Show Details)Apr 15 2020, 7:18 PM