forked from evolix/ansible-roles
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_home: /home/elasticsearch-head
|
||||||
elasticsearch_plugin_head_owner: "www-data"
|
elasticsearch_plugin_head_clone_dir: "{{ elasticsearch_plugin_head_home }}/www"
|
||||||
elasticsearch_plugin_head_group: "www-data"
|
elasticsearch_plugin_head_owner: "elasticsearch-head"
|
||||||
|
elasticsearch_plugin_head_group: "elasticsearch-head"
|
||||||
|
|
|
@ -36,29 +36,30 @@
|
||||||
- packages
|
- packages
|
||||||
- npm
|
- npm
|
||||||
|
|
||||||
- name: Head repository is check-out
|
- 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
|
||||||
|
|
||||||
|
- block:
|
||||||
|
- name: Head repository is check-out
|
||||||
git:
|
git:
|
||||||
repo: "git://github.com/mobz/elasticsearch-head.git"
|
repo: "git://github.com/mobz/elasticsearch-head.git"
|
||||||
dest: "{{ elasticsearch_plugin_head_install_path }}"
|
dest: "{{ elasticsearch_plugin_head_clone_dir }}"
|
||||||
clone: yes
|
clone: yes
|
||||||
tags:
|
tags:
|
||||||
- elasticsearch
|
- packages
|
||||||
|
|
||||||
- name: NPM packages for head are installed
|
- name: NPM packages for head are installed
|
||||||
npm:
|
npm:
|
||||||
path: "{{ elasticsearch_plugin_head_install_path }}"
|
path: "{{ elasticsearch_plugin_head_clone_dir }}"
|
||||||
tags:
|
tags:
|
||||||
- packages
|
- packages
|
||||||
- npm
|
- npm
|
||||||
|
become_user: "{{ elasticsearch_plugin_head_owner }}"
|
||||||
- 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: Elasticsearch HTTP/CORS are enabled
|
- name: Elasticsearch HTTP/CORS are enabled
|
||||||
lineinfile:
|
lineinfile:
|
||||||
|
|
Loading…
Reference in a new issue