useful_scripts/get_passwords.sh

14 lines
713 B
Bash
Raw Normal View History

2021-10-12 19:24:31 +00:00
#!/bin/bash
keystone_passwd=$(juju run --unit keystone/leader 'leader-get admin_passwd')
nagios_passwd=$(juju run --unit nagios/leader 'sudo cat /var/lib/juju/nagios.passwd')
grafana_passwd=$(juju run-action --wait grafana/leader get-admin-password | grep password | awk '{print $2}')
graylog_passwd=$(juju run-action --wait graylog/leader show-admin-password | grep admin-password | awk '{print $2}')
mysql_passwd=$(juju run --unit mysql/leader 'leader-get root-password')
echo "Keystone admin password: ... ${keystone_passwd}"
echo "nagios password: ... ${nagios_passwd}"
echo "grafana password: ... ${grafana_passwd}"
echo "graylog password: ... ${graylog_passwd}"
echo "mysql password: ... ${mysql_passwd}"