Skip to content

Instantly share code, notes, and snippets.

@msplival
Created October 30, 2018 12:27
Show Gist options
  • Select an option

  • Save msplival/b479edf76c4f9d1dda7a69e3addab6f5 to your computer and use it in GitHub Desktop.

Select an option

Save msplival/b479edf76c4f9d1dda7a69e3addab6f5 to your computer and use it in GitHub Desktop.

Revisions

  1. msplival created this gist Oct 30, 2018.
    5 changes: 5 additions & 0 deletions dialmgo-bionic
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    dialmgo() {
    agent=$(cd /var/lib/juju/agents; echo machine-*)
    pw=$(sudo cat /var/lib/juju/agents/${agent}/agent.conf |grep statepassword |awk '{ print $2 }')
    mongo --ssl --sslAllowInvalidCertificates -u ${agent} -p $pw localhost:37017/juju --authenticationDatabase admin
    }