Skip to content

Commit cea57cd

Browse files
author
Dale McDiarmid
committed
Scripts and Templates to use default files directory
1 parent b8a077e commit cea57cd

File tree

4 files changed

+14
-6
lines changed

4 files changed

+14
-6
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
.kitchen/
2-
.kitchen.local.yml
32
*.lock
43
.vendor
54
.bundle

tasks/elasticsearch-config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@
5656
#Copy the instance specific init file
5757
- name: Copy Debian Init File for Instance
5858
template: src=init/debian/elasticsearch.j2 dest={{instance_init_script}} mode=0755 force=yes
59-
when: ansible_os_family == 'Debian'
59+
when: ansible_os_family == 'Debian' and not use_system_d
6060
notify: restart elasticsearch
6161

6262
#Copy the instance specific init file
6363
- name: Copy Redhat Init File for Instance
6464
template: src=init/redhat/elasticsearch.j2 dest={{instance_init_script}} mode=0755 force=yes
65-
when: ansible_os_family == 'RedHat'
65+
when: ansible_os_family == 'RedHat' and not use_system_d
6666
notify: restart elasticsearch
6767

6868
#Copy the systemd specific file if systemd is installed

tasks/elasticsearch-scripts.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@
77

88
- name: Create script dir
99
file: state=directory path={{ es_script_dir }} owner={{ es_user }} group={{ es_group }}
10-
when: es_config['path.scripts'] is defined
10+
11+
- name: Copy default scripts to elasticsearch
12+
copy: src=scripts dest={{ es_script_dir }} owner={{ es_user }} group={{ es_group }}
13+
when: es_scripts_fileglob is not defined
1114

1215
- name: Copy scripts to elasticsearch
1316
copy: src={{ item }} dest={{ es_script_dir }} owner={{ es_user }} group={{ es_group }}
14-
with_fileglob: es_scripts_fileglob | default("scripts")
17+
with_fileglob: es_scripts_fileglob

tasks/elasticsearch-templates.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
---
22

3+
- file: path=/etc/elasticsearch/templates state=directory owner={{ es_user }} group={{ es_group }}
4+
5+
- name: Copy default templates to elasticsearch
6+
copy: src=templates dest=/etc/elasticsearch/ owner={{ es_user }} group={{ es_group }}
7+
when: es_templates_fileglob is not defined
8+
39
- name: Copy templates to elasticsearch
410
copy: src={{ item }} dest=/etc/elasticsearch/ owner={{ es_user }} group={{ es_group }}
5-
with_fileglob: es_templates_fileglob | default("templates")
11+
with_fileglob: es_templates_fileglob
612

713
- set_fact: http_port=9200
814

0 commit comments

Comments
 (0)