head plugin creates a dedicated user
This commit is contained in:
parent
cfd1e690fb
commit
ae47a8e030
|
@ -1,3 +1,4 @@
|
|||
elasticsearch_plugin_head_install_path: /var/www2/elasticsearch-head
|
||||
elasticsearch_plugin_head_owner: "www-data"
|
||||
elasticsearch_plugin_head_group: "www-data"
|
||||
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"
|
||||
|
|
|
@ -36,29 +36,30 @@
|
|||
- packages
|
||||
- npm
|
||||
|
||||
- name: Head repository is check-out
|
||||
git:
|
||||
repo: "git://github.com/mobz/elasticsearch-head.git"
|
||||
dest: "{{ elasticsearch_plugin_head_install_path }}"
|
||||
clone: yes
|
||||
tags:
|
||||
- elasticsearch
|
||||
- name: "User {{ elasticsearch_plugin_head_owner }} is present"
|
||||
user:
|
||||
name: "{{ elasticsearch_plugin_head_owner }}"
|
||||
home: "{{ elasticsearch_plugin_head_home }}"
|
||||
createhome: yes
|
||||
system: yes
|
||||
shell: /bin/false
|
||||
|
||||
- name: NPM packages for head are installed
|
||||
npm:
|
||||
path: "{{ elasticsearch_plugin_head_install_path }}"
|
||||
tags:
|
||||
- packages
|
||||
- npm
|
||||
- block:
|
||||
- name: Head repository is check-out
|
||||
git:
|
||||
repo: "git://github.com/mobz/elasticsearch-head.git"
|
||||
dest: "{{ elasticsearch_plugin_head_clone_dir }}"
|
||||
clone: yes
|
||||
tags:
|
||||
- packages
|
||||
|
||||
- name: "Directory is owned by {{ elasticsearch_plugin_head_owner }}"
|
||||
file:
|
||||
path: "{{ elasticsearch_plugin_head_install_path }}"
|
||||
owner: "{{ elasticsearch_plugin_head_owner }}"
|
||||
group: "{{ elasticsearch_plugin_head_group }}"
|
||||
state: directory
|
||||
tags:
|
||||
- elasticsearch
|
||||
- name: NPM packages for head are installed
|
||||
npm:
|
||||
path: "{{ elasticsearch_plugin_head_clone_dir }}"
|
||||
tags:
|
||||
- packages
|
||||
- npm
|
||||
become_user: "{{ elasticsearch_plugin_head_owner }}"
|
||||
|
||||
- name: Elasticsearch HTTP/CORS are enabled
|
||||
lineinfile:
|
||||
|
|
Loading…
Reference in a new issue