Fixes for serverspec
This commit is contained in:
parent
37447d1618
commit
145f345ec1
5 changed files with 24 additions and 20 deletions
|
|
@ -1,6 +1,14 @@
|
|||
---
|
||||
|
||||
# Configure Elasticsearch Node
|
||||
|
||||
#This relies on elasticsearch installing a serviced script to determine whether one should be copied.
|
||||
- stat: path={{sysd_script}}
|
||||
register: systemd_service
|
||||
|
||||
- set_fact: instance_sysd_script={{sysd_script | dirname }}/{{es_instance_name}}_{{sysd_script | basename}}
|
||||
when: systemd_service.stat.exists
|
||||
|
||||
#For directories we also use the {{inventory_hostname}}-{{ es_instance_name }} - this helps if we have a shared SAN.
|
||||
|
||||
- set_fact: pid_dir={{es_pid_dir}}/{{inventory_hostname}}-{{ es_instance_name }}
|
||||
|
|
@ -45,12 +53,12 @@
|
|||
#Copy the instance specific init file
|
||||
- name: Copy Redhat Init File for Instance
|
||||
template: src=init/redhat/elasticsearch.j2 dest={{instance_init_script}} mode=0755 force=yes
|
||||
when: ansible_os_family == 'Redhat'
|
||||
when: ansible_os_family == 'RedHat'
|
||||
|
||||
#Copy the systemd specific file if systemd is installed
|
||||
- name: Copy Systemd File for Instance
|
||||
template: src=systemd/elasticsearch.j2 dest={{instance_sysd_script}} mode=0644 force=yes
|
||||
when: systemd_service
|
||||
when: systemd_service.stat.exists
|
||||
notify: restart elasticsearch
|
||||
|
||||
#Copy the logging.yml
|
||||
|
|
|
|||
|
|
@ -3,10 +3,6 @@
|
|||
- set_fact: instance_default_file={{default_file | dirname}}/{{es_instance_name}}_{{default_file | basename}}
|
||||
- set_fact: instance_init_script={{init_script | dirname }}/{{es_instance_name}}_{{init_script | basename}}
|
||||
- set_fact: instance_config_directory={{ es_conf_dir }}/{{es_instance_name}}
|
||||
- stat: path={{sysd_script}}
|
||||
register: systemd_service
|
||||
- set_fact: instance_sysd_script={{sysd_script | dirname }}/{{es_instance_name}}_{{sysd_script | basename}}
|
||||
when: systemd_service
|
||||
- set_fact: m_lock_enabled={{ es_config['bootstrap.mlockall'] is defined and es_config['bootstrap.mlockall'] == True }}
|
||||
|
||||
- debug: msg="Node configuration {{ es_config }} "
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue