From ef3ab41d88e491bfeb18d0977dfcd0c69aa441c5 Mon Sep 17 00:00:00 2001 From: Trial97 Date: Mon, 31 May 2021 09:31:40 +0300 Subject: [PATCH] Added elastic search to ansible script --- data/ansible/integration_tests/elasic.yaml | 37 ++++++++++++++++++++++ data/ansible/integration_tests/main.yaml | 3 ++ 2 files changed, 40 insertions(+) create mode 100644 data/ansible/integration_tests/elasic.yaml diff --git a/data/ansible/integration_tests/elasic.yaml b/data/ansible/integration_tests/elasic.yaml new file mode 100644 index 000000000..2c84cb90f --- /dev/null +++ b/data/ansible/integration_tests/elasic.yaml @@ -0,0 +1,37 @@ +--- +- name: Add an apt key for elastic + become: yes + apt_key: + url: https://artifacts.elastic.co/GPG-KEY-elasticsearch + state: present + +- name: Add apt repository for elastic + become: yes + apt_repository: + repo: "deb https://artifacts.elastic.co/packages/7.x/apt stable main" + filename: elastic-7.x + update_cache: yes + +- name: Install elastic + become: yes + apt: + name: "elasticsearch" + state: present + +- name: Enable elasticsearch service and ensure it is not masked + become: yes + systemd: + name: elasticsearch + state: started + enabled: yes + masked: no + +- name: Install the git + become: yes + apt: + name: curl + + +- name: create index + command: 'curl -X PUT "localhost:9200/cdrs?pretty"' + ignore_errors: yes diff --git a/data/ansible/integration_tests/main.yaml b/data/ansible/integration_tests/main.yaml index b0639f96a..a8d2fb0c5 100644 --- a/data/ansible/integration_tests/main.yaml +++ b/data/ansible/integration_tests/main.yaml @@ -85,6 +85,9 @@ - name: Install rabbitmq include: rabbitmq.yaml + + - name: Install elastic + include: elasic.yaml ########################################################################################################################### ###########################################################################################################################