Commit 40d2b1cb by Joseph Mulloy

Remove MONGO_CLUSTERED variable from 3.2 OPS-2205

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