Test for plugin on standard
This commit is contained in:
parent
6ebeccfb01
commit
911b2df9ac
5 changed files with 18 additions and 5 deletions
|
|
@ -67,8 +67,9 @@ platforms:
|
||||||
- rm /etc/yum.repos.d/epel*repo /etc/yum.repos.d/puppetlabs-pc1.repo
|
- rm /etc/yum.repos.d/epel*repo /etc/yum.repos.d/puppetlabs-pc1.repo
|
||||||
- yum -y install initscripts
|
- yum -y install initscripts
|
||||||
- yum clean all
|
- yum clean all
|
||||||
|
- pip install --upgrade pip
|
||||||
- pip install jmespath
|
- pip install jmespath
|
||||||
- pip uninstall -y ansible
|
- yum -y remove ansible
|
||||||
volume: <%=ENV['ES_XPACK_LICENSE_FILE']%>:/tmp/license.json
|
volume: <%=ENV['ES_XPACK_LICENSE_FILE']%>:/tmp/license.json
|
||||||
run_command: "/usr/sbin/init"
|
run_command: "/usr/sbin/init"
|
||||||
privileged: true
|
privileged: true
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ Ansible role for 5.x Elasticsearch. Currently this works on Debian and RedHat b
|
||||||
* Debian 8
|
* Debian 8
|
||||||
* Centos 7
|
* Centos 7
|
||||||
|
|
||||||
The latest Elasticsearch versions of 5.x are actively tested. **Only Ansible versions > 2.2.0 are supported.**
|
The latest Elasticsearch versions of 5.x are actively tested. **Only Ansible versions > 2.3.2 are supported, as this is currently the only version tested.**
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@
|
||||||
failed_when: "'ERROR' in plugin_installed.stdout"
|
failed_when: "'ERROR' in plugin_installed.stdout"
|
||||||
changed_when: plugin_installed.rc == 0
|
changed_when: plugin_installed.rc == 0
|
||||||
with_items: "{{ es_plugins }}"
|
with_items: "{{ es_plugins }}"
|
||||||
when: "{{ item.plugin in plugins_to_install }}"
|
when: item.plugin in plugins_to_install
|
||||||
notify: restart elasticsearch
|
notify: restart elasticsearch
|
||||||
environment:
|
environment:
|
||||||
CONF_DIR: "{{ conf_dir }}"
|
CONF_DIR: "{{ conf_dir }}"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
shared_examples 'standard::init' do |es_version|
|
shared_examples 'standard::init' do |es_version,plugins|
|
||||||
|
|
||||||
describe user('elasticsearch') do
|
describe user('elasticsearch') do
|
||||||
it { should exist }
|
it { should exist }
|
||||||
|
|
@ -75,5 +75,17 @@ shared_examples 'standard::init' do |es_version|
|
||||||
it { should_not exist }
|
it { should_not exist }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
for plugin in plugins
|
||||||
|
describe file('/usr/share/elasticsearch/plugins/'+plugin) do
|
||||||
|
it { should be_directory }
|
||||||
|
it { should be_owned_by 'elasticsearch' }
|
||||||
|
end
|
||||||
|
#confirm plugins are installed and the correct version
|
||||||
|
describe command('curl -s localhost:9200/_nodes/plugins | grep \'"name":"'+plugin+'","version":"'+es_version+'"\'') do
|
||||||
|
its(:exit_status) { should eq 0 }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ require 'standard_spec'
|
||||||
|
|
||||||
|
|
||||||
describe 'Standard Tests v 5.x' do
|
describe 'Standard Tests v 5.x' do
|
||||||
include_examples 'standard::init', "5.2.2"
|
include_examples 'standard::init', "5.2.2", ["ingest-geoip"]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue