Elasticsearch/head: use a custom tmpdir

This commit is contained in:
Jérémy Lecour 2017-05-23 15:09:46 +02:00 committed by Jérémy Lecour
parent c66438a2a3
commit 1a5f1a32a4
3 changed files with 13 additions and 5 deletions

View File

@ -1,5 +1,6 @@
---
elasticsearch_plugin_head_home: /home/elasticsearch-head
elasticsearch_plugin_head_clone_dir: "{{ elasticsearch_plugin_head_home }}/www"
elasticsearch_plugin_head_owner: "elasticsearch-head"
elasticsearch_plugin_head_group: "elasticsearch-head"
elasticsearch_plugin_head_group: "{{ elasticsearch_plugin_head_owner }}"
elasticsearch_plugin_head_home: "/home/{{ elasticsearch_plugin_head_owner }}"
elasticsearch_plugin_head_clone_dir: "{{ elasticsearch_plugin_head_home }}/www"
elasticsearch_plugin_head_tmp_dir: "{{ elasticsearch_plugin_head_home }}/tmp"

View File

@ -24,4 +24,4 @@ galaxy_info:
# alphanumeric characters. Maximum 20 tags per role.
dependencies:
- evogalaxy.nodejs
- nodejs

View File

@ -9,7 +9,7 @@
shell: /bin/false
- block:
- name: Head repository is check-out
- name: Head repository is checked-out
git:
repo: "git://github.com/mobz/elasticsearch-head.git"
dest: "{{ elasticsearch_plugin_head_clone_dir }}"
@ -17,12 +17,19 @@
tags:
- packages
- name: Create tmpdir
file:
dest: "{{ elasticsearch_plugin_head_tmp_dir }}"
state: directory
- name: NPM packages for head are installed
npm:
path: "{{ elasticsearch_plugin_head_clone_dir }}"
tags:
- packages
- npm
environment:
TMPDIR: "{{ elasticsearch_plugin_head_tmp_dir }}"
become_user: "{{ elasticsearch_plugin_head_owner }}"
- name: Elasticsearch HTTP/CORS are enabled