Fix for server spec debian 8

This commit is contained in:
Dale McDiarmid 2015-11-27 22:52:36 +00:00
parent 6c4289b2df
commit 1034995899
4 changed files with 9 additions and 19 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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