Skip to content

Instantly share code, notes, and snippets.

@niedbalski
Created October 27, 2017 10:06
Show Gist options
  • Save niedbalski/e864901c814d7025ad410ceab2f36161 to your computer and use it in GitHub Desktop.
Save niedbalski/e864901c814d7025ad410ceab2f36161 to your computer and use it in GitHub Desktop.
relation-ids-set.sh
#!/bin/bash
# ./set-reldata.sh percona-cluster/0 cluster foo=bar bar=foo
set -ex
for id in $(juju run --unit $1 "relation-ids $2"); do
for unit in $(juju run --unit $1 "relation-list $id"); do
juju run --unit $unit "relation-set -r $id ${@:3}"
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment