Skip to content

Commit

Permalink
BC-7240 - fix rs init
Browse files Browse the repository at this point in the history
  • Loading branch information
mamutmk5 authored Jun 27, 2024
1 parent ecaaefa commit 56f7959
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ansible/roles/mongo-repset/templates/init-configmap.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ data:
do
sleep 1
done
mongosh $MONGODB_URI --eval 'rs.add("mongodb-0.mongo-svc:27017")'
mongosh $MONGODB_URI --eval 'rs.remove("mongodb-0.mongo-svc:27017")'
mongosh $MONGODB_URI --eval 'cfg = rs.conf();cfg.members[0].host=\"mongodb-0.mongo-svc:27017\";rs.reconfig(cfg);")'
mongosh $MONGODB_URI --eval 'rs.add("mongodb-1.mongo-svc:27017")'
mongosh $MONGODB_URI --eval 'rs.add("mongodb-2.mongo-svc:27017")'
sleep 30
Expand Down

0 comments on commit 56f7959

Please sign in to comment.