Script tests
This commit is contained in:
parent
1daf8eb379
commit
1739cc8595
4 changed files with 11 additions and 4 deletions
|
|
@ -6,6 +6,7 @@ es_use_repository: true
|
||||||
es_start_service: true
|
es_start_service: true
|
||||||
es_plugins_reinstall: false
|
es_plugins_reinstall: false
|
||||||
es_scripts: false
|
es_scripts: false
|
||||||
|
es_scripts_src: scripts
|
||||||
es_templates: false
|
es_templates: false
|
||||||
es_user: elasticsearch
|
es_user: elasticsearch
|
||||||
es_group: elasticsearch
|
es_group: elasticsearch
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
- set_fact: es_script_dir={{ es_log_dir }}/{{inventory_hostname}}-{{ es_instance_name }}
|
- set_fact: es_script_dir={{ es_conf_dir }}/{{es_instance_name}}/scripts
|
||||||
|
|
||||||
- set_fact: es_script_dir={{es_config['path.scripts']}}
|
- set_fact: es_script_dir={{es_config['path.scripts']}}
|
||||||
when: es_config['path.scripts'] is not defined
|
when: es_config['path.scripts'] is defined
|
||||||
|
|
||||||
- name: Create script dir
|
- name: Create script dir
|
||||||
file: state=directory path={{ es_script_dir }} owner={{ es_user }} group={{ es_group }}
|
file: state=directory path={{ es_script_dir }} owner={{ es_user }} group={{ es_group }}
|
||||||
|
|
||||||
- name: Copy scripts to elasticsearch
|
- name: Copy scripts to elasticsearch
|
||||||
copy: src=scripts dest={{ es_scripts_dir }}
|
copy: src={{es_scripts_src}} dest={{ es_script_dir }}
|
||||||
|
|
@ -4,4 +4,5 @@
|
||||||
roles:
|
roles:
|
||||||
- { role: elasticsearch, es_config: { "discovery.zen.ping.multicast.enabled": true }, es_instance_name: "node1" }
|
- { role: elasticsearch, es_config: { "discovery.zen.ping.multicast.enabled": true }, es_instance_name: "node1" }
|
||||||
vars:
|
vars:
|
||||||
es_scripts: true
|
es_scripts: true
|
||||||
|
es_scripts_src: "./test/package/scripts/"
|
||||||
|
|
@ -18,6 +18,11 @@ context "basic tests" do
|
||||||
it { should be_file }
|
it { should be_file }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe file('/etc/elasticsearch/node1/scripts') do
|
||||||
|
it { should be_directory }
|
||||||
|
it { should be_owned_by 'elasticsearch' }
|
||||||
|
end
|
||||||
|
|
||||||
describe 'Node listening' do
|
describe 'Node listening' do
|
||||||
it 'listening in port 9200' do
|
it 'listening in port 9200' do
|
||||||
expect(port 9200).to be_listening
|
expect(port 9200).to be_listening
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue