From 2207df4622bb47437e7805868f4e572edfef5fcd Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Wed, 13 Jun 2018 15:38:29 -0500 Subject: [PATCH] Add task to install requirements and change pathing To run the curator playbook pip is required. This change installs the package `python-virtualenv` to resolve the dependency and installs the curator application into a virtualenv within /opt. This will keep the host clean by isolating the dependencies and ensure that we can easily clean up should we ever need to. Change-Id: If872bb30281948d79a3f79a0e3a39e8a457c6fdb Signed-off-by: Kevin Carter --- elk_metrics_6x/installCurator.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/elk_metrics_6x/installCurator.yml b/elk_metrics_6x/installCurator.yml index 46b5a16b..b1f5853a 100644 --- a/elk_metrics_6x/installCurator.yml +++ b/elk_metrics_6x/installCurator.yml @@ -25,11 +25,22 @@ environment: "{{ deployment_environment_variables | default({}) }}" pre_tasks: + - name: Ensure virtualenv is installed + apt: + name: "{{ item }}" + state: "present" + update_cache: true + with_items: + - python-virtualenv + tags: + - package_install + - name: Ensure curator is installed pip: - name: elasticsearch-curator + name: "elasticsearch-curator<6" state: "{{ elk_package_state | default('present') }}" extra_args: --isolated + virtualenv: /opt/elasticsearch-curator - name: exit playbook after uninstall meta: end_play @@ -87,7 +98,7 @@ systemd_services: - service_name: "curator" execstarts: - - /usr/local/bin/curator + - /opt/elasticsearch-curator/bin/curator --config /var/lib/curator/curator.yml /var/lib/curator/actions.yml timer: