alphagov/fabric-scripts — pull request #57 by philandstuff (2014-10-10 13:01:33+00:00)
Title: Clean mongo.step_down_primary output

This cleans up the output of mongo.step_down_primary, and tidies up the code in mongo.py more generally.

Tested on staging (trimmed output):

```
$ fab staging -H mongo-3.backend mongo.step_down_primary
[mongo-3.backend] Executing task 'staging'
[mongo-3.backend] Executing task 'mongo.step_down_primary'
[mongo-3.backend] run: mongo --quiet --eval 'printjson(rs.stepDown(100))'

Done.
$ fab staging -H mongo-1.backend mongo.find_primary
[mongo-1.backend] Executing task 'staging'
[mongo-1.backend] Executing task 'mongo.find_primary'
[mongo-1.backend] run: mongo --quiet --eval 'printjson(rs.isMaster())'
Current primary is backend-2.mongo:27017
```