From f09db32bb660396dea508a7f2a380b74ad6cb254 Mon Sep 17 00:00:00 2001 From: Olivier Bierlaire Date: Thu, 18 Aug 2022 10:36:18 +0200 Subject: [PATCH] Variable to copy installer script instead of downloading it --- README.md | 5 ++++- tasks/ece-bootstrap/main.yml | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6f5be44..a28c560 100644 --- a/README.md +++ b/README.md @@ -78,8 +78,11 @@ The following variables are avaible: - Default: docker.elastic.co - `ece_docker_repository`: The docker repository in the given registry. This is only relevant if you have a private mirror - Default: cloud-enterprise -- `ece_installer_url`: The location of the installation script. Can be a local file for offline installation. +- `ece_installer_url`: The url of the installation script to download. - Default: `https://download.elastic.co/cloud/elastic-cloud-enterprise.sh` + - This will use the local script if existing in `/home/elastic/elastic-cloud-enterprise.sh` +- `ece_installer_path`: The location of the installation script on the controller machine. It will be copied to remote host. + - Default: left empty, it will download it from internet (cf. `ece_installer_url`) - `docker_config`: If specified as a path to a docker config, copies it to the target hosts - [Supported Docker Versions](https://www.elastic.co/guide/en/cloud-enterprise/2.7/ece-software-prereq.html#ece-linux-docker) - `docker_version`: Last supported version on Centos 7/8 and RHEL 7/8 is 20.0, Ubuntu 16, Ubuntu 18 and SLES 12 is 19.03. diff --git a/tasks/ece-bootstrap/main.yml b/tasks/ece-bootstrap/main.yml index b59ce93..1bcc1ef 100644 --- a/tasks/ece-bootstrap/main.yml +++ b/tasks/ece-bootstrap/main.yml @@ -1,9 +1,17 @@ --- +- name: Copy ece installer + copy: + src: "{{ ece_installer_path }}" + dest: /home/elastic/elastic-cloud-enterprise.sh + mode: 0755 + when: ece_installer_path is defined + - name: Download ece installer get_url: url: "{{ ece_installer_url }}" dest: /home/elastic/elastic-cloud-enterprise.sh mode: 0755 + when: ece_installer_path is not defined - name: Ensure ~/.docker is present file: