-
Notifications
You must be signed in to change notification settings - Fork 63
/
install_stack.yml
executable file
·39 lines (37 loc) · 1.3 KB
/
install_stack.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
- name: Set default ece role if not defined
set_fact:
ece_roles: [director, coordinator, proxy, allocator]
when: ece_roles is undefined
- name: Get the roles token
uri:
url: "https://{{primary_hostname}}:12443/api/v1/platform/configuration/security/enrollment-tokens"
method: POST
user: admin
password: "{{ adminconsole_root_password }}"
force_basic_auth: yes
return_content: yes
validate_certs: no
headers:
Content-Type: "application/json"
body_format: json
body: '{ "persistent": false, "roles": {{ ece_roles }} }'
register: roles_token
- name: Execute installation
shell: /home/elastic/elastic-cloud-enterprise.sh
--coordinator-host {{ primary_hostname }}
--roles-token '{{ roles_token.json.token }}'
--roles '{{ ece_roles | join(',') }}'
--availability-zone {{ availability_zone }}
--cloud-enterprise-version {{ ece_version }}
--docker-registry {{ ece_docker_registry }}
--ece-docker-repository {{ ece_docker_repository }}
--host-storage-path {{ data_dir }}/elastic
--memory-settings '{{ memory_settings }}'
--runner-id {{ ece_runner_id }}{% if capacity is defined %}
--capacity {{ capacity }}{% endif %}
{{ extra_installer_args }}
become: yes
become_method: sudo
become_user: elastic
register: installation