mongo_3_0.yml 1.17 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
# Manages a mongo cluster.
# To set up a new mongo cluster, make sure you've configured MONGO_RS_CONFIG
# as used by mongo_replica_set in the mongo_3_0 role.
#
# If you are initializing a cluster, your command might look like:
# ansible-playbook mongo_3_0.yml -i 10.1.1.1,10.2.2.2,10.3.3.3 -e@/path/to/edx.yml -e@/path/to/ed.yml
# If you just want to deploy an updated replica set config, you can run
# ansible-playbook mongo_3_0.yml -i any-cluster-ip -e@/path/to/edx.yml -e@/path/to/ed.yml --tags configure_replica_set
#
# ADDING A NEW CLUSTER MEMBER
# If you are adding a member to a cluster, you must be sure that the new machine is not first in your inventory
# ansible-playbook mongo_3_0.yml -i 10.1.1.1,10.2.2.2,new-machine-ip -e@/path/to/edx.yml -e@/path/to/ed.yml
Fred Smith committed
13 14
- name: Deploy MongoDB
  hosts: all
15
  become: True
Fred Smith committed
16 17
  gather_facts: True
  roles:
18
    - aws
19
    - enhanced_networking
Fred Smith committed
20
    - mongo_3_0
Feanil Patel committed
21
    - munin_node
Fred Smith committed
22 23 24 25
    - role: datadog
      when: COMMON_ENABLE_DATADOG
    - role: splunkforwarder
      when: COMMON_ENABLE_SPLUNKFORWARDER
26 27
    - role: newrelic_infrastructure
      when: COMMON_ENABLE_NEWRELIC_INFRASTRUCTURE
28 29 30
    - role: datadog-uninstall
      when: not COMMON_ENABLE_DATADOG