Merge branch 'activate-elasticsearch-license' of https://github.com/barryib/ansible-elasticsearch into barryib-activate-elasticsearch-license
This commit is contained in:
commit
6768a15b89
7 changed files with 55 additions and 2 deletions
|
|
@ -87,6 +87,16 @@ shared_examples 'xpack::init' do |es_version|
|
|||
describe command('curl -s localhost:9200/_nodes/plugins?pretty=true -u es_admin:changeMe | grep license') do
|
||||
its(:exit_status) { should eq 0 }
|
||||
end
|
||||
|
||||
#Test if x-pack is activated
|
||||
describe 'x-pack activation' do
|
||||
it 'should be activated with the license uid '+ENV["ES_XPACK_LICENSE_UID"] do
|
||||
command = command('curl -s localhost:9200/_xpack/license?pretty=true -u es_admin:changeMe')
|
||||
expect(command.stdout).to match(active)
|
||||
expect(command.stdout).to match(ENV["ES_XPACK_LICENSE_UID"])
|
||||
expect(command.exit_status).to eq(0)
|
||||
end
|
||||
end
|
||||
|
||||
describe file('/usr/share/elasticsearch/plugins/shield') do
|
||||
it { should be_directory }
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
- { role: elasticsearch, es_config: { "http.port": 9200, "transport.tcp.port":9300, discovery.zen.ping.unicast.hosts: "localhost:9300",
|
||||
"shield.authc.realms.file1.type": "file","shield.authc.realms.file1.order": 0, "shield.authc.realms.native1.type": "native","shield.authc.realms.native1.order": 1 },
|
||||
es_instance_name: "shield_node" }
|
||||
include_vars: <%= ENV['ES_XPACK_LICENSE_FILE'] %>
|
||||
vars:
|
||||
es_templates: true
|
||||
es_enable_xpack: true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue