mirror of
https://github.com/aljazceru/ansible-elasticsearch.git
synced 2025-12-17 17:14:20 +01:00
Fix for server spec debian 8
This commit is contained in:
@@ -1,6 +1,13 @@
|
|||||||
# ansible-elasticsearch
|
# ansible-elasticsearch
|
||||||
|
|
||||||
Ansible playbook / roles / tasks for Elasticsearch. Currently it will work on Debian and RedHat based linux systems.
|
Ansible playbook / roles / tasks for Elasticsearch. Currently it will work on Debian and RedHat based linux systems. Tested platforms are:
|
||||||
|
|
||||||
|
* Ubuntu 1404
|
||||||
|
* Debian 7
|
||||||
|
* Debian 8
|
||||||
|
* Centos 7
|
||||||
|
* Centos 8
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,7 @@
|
|||||||
#This relies on elasticsearch installing a serviced script to determine whether one should be copied.
|
#This relies on elasticsearch installing a serviced script to determine whether one should be copied.
|
||||||
- stat: path={{sysd_script}}
|
- stat: path={{sysd_script}}
|
||||||
register: systemd_service
|
register: systemd_service
|
||||||
|
- set_fact: use_system_d={{systemd_service.stat.exists and (not ansible_distribution == 'Debian' or ansible_distribution_version | version_compare('8', '<'))}}
|
||||||
- set_fact: use_system_d={{systemd_service.stat.exists and (ansible_os_family == 'RedHat' or ansible_distribution_version | version_compare('8', '<'))}}
|
|
||||||
|
|
||||||
- set_fact: instance_sysd_script={{sysd_script | dirname }}/{{es_instance_name}}_{{sysd_script | basename}}
|
- set_fact: instance_sysd_script={{sysd_script | dirname }}/{{es_instance_name}}_{{sysd_script | basename}}
|
||||||
when: use_system_d
|
when: use_system_d
|
||||||
|
|||||||
@@ -73,10 +73,5 @@ context "basic tests" do
|
|||||||
its(:exit_status) { should eq 0 }
|
its(:exit_status) { should eq 0 }
|
||||||
end
|
end
|
||||||
|
|
||||||
describe file('/usr/lib/systemd/system/node1_elasticsearch.service') do
|
|
||||||
it { should be_file }
|
|
||||||
it { should contain 'LimitMEMLOCK=infinity' }
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -156,16 +156,5 @@ context "basic tests" do
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
#Test server spec file has been created and modified
|
|
||||||
describe file('/usr/lib/systemd/system/master_elasticsearch.service') do
|
|
||||||
it { should be_file }
|
|
||||||
it { should contain 'LimitMEMLOCK=infinity' }
|
|
||||||
end
|
|
||||||
|
|
||||||
describe file('/usr/lib/systemd/system/node1_elasticsearch.service') do
|
|
||||||
it { should be_file }
|
|
||||||
it { should_not contain 'LimitMEMLOCK=infinity' }
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user