vagrant-cluster.yml 1.09 KB
Newer Older
1 2 3 4 5
- name: Configure group cluster 
  hosts: all
  sudo: True
  gather_facts: True
  vars:
6
    vagrant_cluster: yes
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
    mongo_cluster_members:
      - "cluster1"
      - "cluster2"
      - "cluster3"
    MONGO_CLUSTERED: yes
    MONGO_CLUSTER_KEY: 'password'
    ELASTICSEARCH_CLUSTERED: yes
    MARIADB_CLUSTERED: yes
    MARIADB_CREATE_DBS: no
  roles:
    - user
    - mongo
    - oraclejdk
    - elasticsearch
    - mariadb
    - edx_ansible
23

24 25 26 27 28 29 30
# Rabbit needs to be built serially
- name: Configure group cluster serial roles 
  hosts: all
  sudo: True
  serial: 1
  gather_facts: True
  vars:
31
    RABBITMQ_CLUSTERED_HOSTS: 
32 33 34 35 36 37
      - "rabbit@cluster1"
      - "rabbit@cluster2"
      - "rabbit@cluster3"
    rabbitmq_ip: ""
  roles:
    - rabbitmq
38

39
# There are race conditions creating DBs
40 41 42 43 44 45 46 47 48 49
# in MariaDB occasionally so this play will work
# but will also show as failed
- name: Configure group with tasks that will always fail
  hosts: all
  sudo: True
  gather_facts: True
  vars:
    MARIADB_CLUSTERED: yes
    MARIADB_CREATE_DBS: yes
  vars_files:
50
    - "roles/analytics_api/defaults/main.yml"
51
  roles:
52
    - mariadb