useful_scripts/get_passwords.sh
Arif Ali bb166ecc96
Update to latest scripts
* do_innodb_resolution.sh: mostly now works, the timing between
  update-status and the add-instance may need to be tweaked still
* vault.sh: use juju status json to grab the IPs for the vault units
* check_juju.sh: add debug to the default status
* check_avail_pci.sh: add hypervisor_name to the output to make it
  easier to grab multiple nodes
* get_passwords.sh: add extra password for collection
2024-01-09 14:19:47 +00:00

16 lines
905 B
Bash
Executable File

#!/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')
innodb_admin_passwd=$(juju run --unit mysql-innodb-cluster/leader 'leader-get mysql.passwd')
innodb_cluster_passwd=$(juju run --unit mysql-innodb-cluster/leader 'leader-get cluster-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}"