-
Notifications
You must be signed in to change notification settings - Fork 60
/
Copy pathmesos_primaries.yml
21 lines (19 loc) · 1.33 KB
/
mesos_primaries.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
---
- hosts: [mesos_primaries]
sudo: True
pre_tasks:
- name: Install HAProxy (RedHat)
yum: pkg=haproxy state=present
when: ansible_os_family == "RedHat"
- name: Install HAProxy (Ubuntu)
apt: pkg=haproxy state=present
when: ansible_os_family == "Debian"
- name: Sets haproxy to enabled (Ubuntu)
lineinfile: dest=/etc/default/haproxy regexp="^ENABLED" line="ENABLED=1"
when: ansible_os_family == "Debian"
roles:
- { role: 'ansible-java8', tags: ['runtimes', 'java'], when: ansible_os_family == 'Debian' }
- { role: 'ansible-zookeeper', zookeeper_hosts: "{{ groups.mesos_primaries}}", tags: ['zookeeper'] }
- { role: 'ansible-mesos', mesos_quorum: "2", zookeeper_hostnames: "{{ groups.mesos_primaries | join(':' + zookeeper_client_port + ',') }}:{{ zookeeper_client_port }}", mesos_install_mode: 'master', mesos_cluster_name: 'mlh_mesos', tags: ['mesos', 'platforms'] }
- { role: 'ansible-marathon', zookeeper_hostnames: "{{ groups.mesos_primaries | join(':' + zookeeper_client_port + ',') }}:{{ zookeeper_client_port }}", tags: ['mesos-tools'] }
- { role: 'ansible-consul', consul_client_address: "0.0.0.0", consul_version: "0.4.1", consul_datacenter: "sea", consul_is_server: true, consul_servers: "{{ groups.mesos_primaries }}", consul_is_ui: true, consul_join_at_start: true }