From 44a2ad2119b94f9a349dc02cfa3f204dfe829f69 Mon Sep 17 00:00:00 2001 From: Marc-Antoine Leclercq Date: Mon, 11 Apr 2022 15:19:32 +0200 Subject: [PATCH 1/2] Update install_stack.yml use jinja2 conditional for compatibility reasons with ansible 2.9 --- tasks/ece-bootstrap/secondary/install_stack.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tasks/ece-bootstrap/secondary/install_stack.yml b/tasks/ece-bootstrap/secondary/install_stack.yml index cf30bc0..8117c69 100755 --- a/tasks/ece-bootstrap/secondary/install_stack.yml +++ b/tasks/ece-bootstrap/secondary/install_stack.yml @@ -24,7 +24,18 @@ 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 }} {{ '--capacity ' + capacity if capacity }} + 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 %} become: yes become_method: sudo become_user: elastic From b38283265977d36bfcf3baf804b50448970d8d7d Mon Sep 17 00:00:00 2001 From: Marc-Antoine Leclercq Date: Mon, 11 Apr 2022 15:36:25 +0200 Subject: [PATCH 2/2] Remove default definition of capacity We now want capacity to be undefined so that it can be skipped. --- tasks/ece-bootstrap/secondary/install_stack.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tasks/ece-bootstrap/secondary/install_stack.yml b/tasks/ece-bootstrap/secondary/install_stack.yml index 8117c69..cdede92 100755 --- a/tasks/ece-bootstrap/secondary/install_stack.yml +++ b/tasks/ece-bootstrap/secondary/install_stack.yml @@ -4,10 +4,6 @@ ece_roles: [director, coordinator, proxy, allocator] when: ece_roles is undefined -- name: Set empty capacity if not defined - set_fact: - capacity: "{{ capacity | default('') }}" - - name: Get the roles token uri: url: "https://{{primary_hostname}}:12443/api/v1/platform/configuration/security/enrollment-tokens"