From 24c2836a505c761885063e8016b602e6c5936ef3 Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Sat, 19 Nov 2022 23:00:24 +0200 Subject: [PATCH] set version of es --- defaults/main.yml | 3 ++- tasks/docker.yml | 5 +---- tasks/docker/init.yml | 26 -------------------------- templates/docker-compose.yml.j2 | 2 +- 4 files changed, 4 insertions(+), 32 deletions(-) delete mode 100644 tasks/docker/init.yml diff --git a/defaults/main.yml b/defaults/main.yml index 996708f..0321ac3 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -71,7 +71,8 @@ es_enabled: 'false' es_host: localhost es_port: 9200 es_user: elastic -es_pass: password +es_pass: "{{ vault_mastodon_es_pass }}" +es_version: 7.17.7 s3_enabled: 'false' s3_bucket: '' diff --git a/tasks/docker.yml b/tasks/docker.yml index 9c976cf..4e21204 100644 --- a/tasks/docker.yml +++ b/tasks/docker.yml @@ -1,7 +1,4 @@ - -- name: Bootstrapping - import_tasks: docker/init.yml - +--- - import_tasks: docker/ubuntu.yml when: ansible_distribution == 'Ubuntu' diff --git a/tasks/docker/init.yml b/tasks/docker/init.yml deleted file mode 100644 index 5d3acf2..0000000 --- a/tasks/docker/init.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- - -- name: Check if Python is installed - raw: command -v python - register: python_installed - ignore_errors: True - -- name: Check if yum is installed - raw: command -v yum - register: yum_installed - ignore_errors: True - -- name: Check if apt is installed - raw: command -v apt - register: apt_installed - ignore_errors: True - -- name: Bootstrap Python on Amazon Linux - raw: yum update && yum install -y python27 - when: python_installed is failed and yum_installed is succeeded - become: true - -- name: Bootstrap Python on Ubuntu Linux - raw: apt update && apt install -y python - when: python_installed is failed and apt_installed is succeeded - become: true diff --git a/templates/docker-compose.yml.j2 b/templates/docker-compose.yml.j2 index 089ba2c..c8d75e9 100644 --- a/templates/docker-compose.yml.j2 +++ b/templates/docker-compose.yml.j2 @@ -42,7 +42,7 @@ services: - internal_network {% if es_enabled %} elasticsearch: - image: elasticsearch:latest + image: elasticsearch:{{ es_version | default('7.17.7') }} restart: always env_file: database.env.production environment: