Arif Ali
a90392cc89
* Added a simple check juju script * fix cloud script for focal, similar to the bionic one * initialise vault scipt * Update get_password script to add innodb * Added a new script for check_vip_issue_db.sh
14 lines
606 B
Bash
Executable File
14 lines
606 B
Bash
Executable File
#!/bin/bash
|
|
|
|
juju_status=$(mktemp)
|
|
|
|
juju status --format json > $juju_status
|
|
|
|
# old method
|
|
#cat ${juju_status} | jq -rc '.machines | to_entries[] |[.key,.value.hostname,.value."ip-addresses"]'
|
|
#cat ${juju_status} | jq -rc '.machines | to_entries[] | select(.value.containers != null ) | .value.containers | to_entries[] | [.key,.value.hostname,.value."ip-addresses"]'
|
|
|
|
# new method
|
|
cat ${juju_status} | jq -rc '.machines | to_entries[] |[.key,.value.hostname,.value."ip-addresses", [(select(.value.containers != null ) | .value.containers | to_entries[] | [.key,.value.hostname,.value."ip-addresses"])]]'
|
|
|