Commit 4997b7c9 by Feanil Patel

Add a default cluster key and other defaults.

This is needed so that we can properly build devstacks without passing in any other config.
parent 6e91134d
......@@ -270,6 +270,7 @@
service:
name: mongod
state: restarted
enabled: true
when: MONGO_CLUSTERED and initialize_replica_set
tags:
- "install"
......
......@@ -49,10 +49,14 @@ MONGO_BIND_IP: 127.0.0.1
MONGO_REPL_SET: "rs0"
MONGO_AUTH: true
MONGO_CLUSTER_KEY: "CHANGEME"
# Cluster member configuration
# Fed directly into mongodb_replica_set module
MONGO_RS_CONFIG:
members: []
_id: '{{ MONGO_REPL_SET }}'
members:
- host: '127.0.0.1'
# Storage engine options in 3.2: "mmapv1" or "wiredTiger"
# 3.2 and 3.4 default to wiredTiger
......
......@@ -104,7 +104,7 @@
# and connect anonymously next.
- name: determine if there is a replica set already
mongodb_rs_status:
host: "{{ ansible_default_ipv4['address'] }}"
host: "{{ ansible_lo['ipv4']['address'] }}"
username: "{{ MONGO_ADMIN_USER }}"
password: "{{ MONGO_ADMIN_PASSWORD }}"
run_once: true
......@@ -116,7 +116,7 @@
- name: Try checking the replica set with no user/pass in case this is a new box
mongodb_rs_status:
host: "{{ ansible_default_ipv4['address'] }}"
host: "{{ ansible_lo['ipv4']['address'] }}"
run_once: true
register: unauthed_replica_set_already_configured
when: authed_replica_set_already_configured.failed is defined
......@@ -289,7 +289,7 @@
# checking the replica set status until we see a PRIMARY in the results.
- name: Wait for the replica set to update and (if needed) elect a primary
mongodb_rs_status:
host: "{{ ansible_default_ipv4['address'] }}"
host: "{{ ansible_lo['ipv4']['address'] }}"
username: "{{ MONGO_ADMIN_USER }}"
password: "{{ MONGO_ADMIN_PASSWORD }}"
register: status
......
......@@ -127,9 +127,9 @@ fi
if [[ -z $ami ]]; then
if [[ $server_type == "full_edx_installation" ]]; then
ami="ami-c20128d4"
ami="ami-aa2f25d1"
elif [[ $server_type == "ubuntu_16.04" || $server_type == "full_edx_installation_from_scratch" ]]; then
ami="ami-20631a36"
ami="ami-1d4e7a66"
fi
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment