Commit 40d2b1cb by Joseph Mulloy

Remove MONGO_CLUSTERED variable from 3.2 OPS-2205

parent 027edac5
......@@ -39,7 +39,6 @@ MONGO_USERS:
database: edxapp
roles: readWrite
MONGO_CLUSTERED: false
MONGO_BIND_IP: 127.0.0.1
MONGO_REPL_SET: "rs0"
MONGO_AUTH: true
......
......@@ -108,7 +108,6 @@
password: "{{ MONGO_ADMIN_PASSWORD }}"
run_once: true
register: authed_replica_set_already_configured
when: MONGO_CLUSTERED
ignore_errors: true
tags:
- "install"
......@@ -119,7 +118,7 @@
host: "{{ ansible_default_ipv4['address'] }}"
run_once: true
register: unauthed_replica_set_already_configured
when: MONGO_CLUSTERED and authed_replica_set_already_configured.failed is defined
when: authed_replica_set_already_configured.failed is defined
ignore_errors: true
tags:
- "install"
......@@ -143,8 +142,7 @@
set_fact:
initialize_replica_set: true
skip_replica_set: true
when: MONGO_CLUSTERED
and authed_replica_set_already_configured.status is not defined
when: authed_replica_set_already_configured.status is not defined
and unauthed_replica_set_already_configured.status is not defined
tags:
- "install"
......@@ -152,7 +150,7 @@
- name: warn about unconfigured replica sets
debug: msg="You do not appear to have a Replica Set configured, deploying one for you"
when: MONGO_CLUSTERED and initialize_replica_set
when: initialize_replica_set
tags:
- "install"
- "install:configuration"
......@@ -164,7 +162,6 @@
mode: 0600
owner: mongodb
group: mongodb
when: MONGO_CLUSTERED
notify: restart mongo
tags:
- "install"
......@@ -251,7 +248,7 @@
- name: Unset our skip initializing replica set fact so that mongod.conf gets a replica set
set_fact:
skip_replica_set: false
when: MONGO_CLUSTERED and initialize_replica_set
when: initialize_replica_set
tags:
- "install"
- "install:configuration"
......@@ -261,7 +258,7 @@
src: mongod.conf.j2
dest: /etc/mongod.conf
backup: yes
when: MONGO_CLUSTERED and initialize_replica_set
when: initialize_replica_set
tags:
- "install"
- "install:configuration"
......@@ -270,7 +267,7 @@
service:
name: mongod
state: restarted
when: MONGO_CLUSTERED and initialize_replica_set
when: initialize_replica_set
tags:
- "install"
- "install:configuration"
......@@ -279,7 +276,7 @@
wait_for:
port: 27017
delay: 2
when: MONGO_CLUSTERED and initialize_replica_set
when: initialize_replica_set
tags:
- "install"
- "install:configuration"
......@@ -291,7 +288,6 @@
rs_config: "{{ MONGO_RS_CONFIG }}"
run_once: true
register: replset_status
when: MONGO_CLUSTERED
tags:
- "manage"
- "manage:db"
......@@ -311,7 +307,6 @@
retries: 5
delay: 2
run_once: true
when: MONGO_CLUSTERED
tags:
- "manage"
- "manage:db"
......@@ -329,22 +324,6 @@
replica_set: "{{ MONGO_REPL_SET }}"
with_items: "{{ MONGO_USERS }}"
run_once: true
when: MONGO_CLUSTERED
tags:
- "manage"
- "manage:db"
- name: create mongodb users in a standalone configuration
mongodb_user:
database: "{{ item.database }}"
login_user: "{{ MONGO_ADMIN_USER }}"
login_password: "{{ MONGO_ADMIN_PASSWORD }}"
name: "{{ item.user }}"
password: "{{ item.password }}"
roles: "{{ item.roles }}"
state: present
with_items: "{{ MONGO_USERS }}"
when: not MONGO_CLUSTERED
tags:
- "manage"
- "manage:db"
......@@ -29,7 +29,7 @@ systemLog:
{% endif %}
logRotate: {{ mongo_logrotate }}
{% if MONGO_CLUSTERED and not skip_replica_set %}
{% if not skip_replica_set %}
replication:
replSetName: {{ MONGO_REPL_SET }}
......@@ -39,11 +39,7 @@ security:
{% endif %}
net:
{% if not MONGO_CLUSTERED %}
{# Bind to all ips(default) if in clustered mode,
otherwise only to the specified local ip. #}
bindIp: {{ MONGO_BIND_IP }}
{% endif %}
port: {{ mongo_port }}
......
......@@ -8,7 +8,6 @@
- "cluster1"
- "cluster2"
- "cluster3"
MONGO_CLUSTERED: yes
MONGO_CLUSTER_KEY: 'password'
ELASTICSEARCH_CLUSTERED: yes
MARIADB_CLUSTERED: yes
......
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