Add xpack license for issue-test since security is not available in the

trial license
This commit is contained in:
Michael Russell 2018-06-14 18:41:41 +02:00
parent dce98bbd34
commit 3ab3b1d05c
No known key found for this signature in database
GPG key ID: A90C1696496085FE
3 changed files with 8 additions and 7 deletions

View file

@ -146,20 +146,20 @@ shared_examples 'xpack::init' do |vars|
end end
#Test users file, users_roles and roles.yml #Test users file, users_roles and roles.yml
describe file('/etc/elasticsearch/security_node' + vars['es_xpack_conf_subdir'] + '/gcusers_roles') do describe file('/etc/elasticsearch/security_node' + vars['es_xpack_conf_subdir'] + '/users_roles') do
it { should be_owned_by 'elasticsearch' } it { should be_owned_by 'elasticsearch' }
it { should contain 'admin:es_admin' } it { should contain 'admin:es_admin' }
it { should contain 'power_user:testUser' } it { should contain 'power_user:testUser' }
end end
describe file('/etc/elasticsearch/security_node' + vars['es_xpack_conf_subdir'] + '/gcusers') do describe file('/etc/elasticsearch/security_node' + vars['es_xpack_conf_subdir'] + '/users') do
it { should be_owned_by 'elasticsearch' } it { should be_owned_by 'elasticsearch' }
it { should contain 'testUser:' } it { should contain 'testUser:' }
it { should contain 'es_admin:' } it { should contain 'es_admin:' }
end end
describe file('/etc/elasticsearch/security_node' + vars['es_xpack_conf_subdir'] + '/gcroles.yml') do describe file('/etc/elasticsearch/security_node' + vars['es_xpack_conf_subdir'] + '/roles.yml') do
it { should be_owned_by 'elasticsearch' } it { should be_owned_by 'elasticsearch' }
#Test contents as expected #Test contents as expected
its(:md5sum) { should eq '7800182547287abd480c8b095bf26e9e' } its(:md5sum) { should eq '7800182547287abd480c8b095bf26e9e' }
@ -210,7 +210,7 @@ shared_examples 'xpack::init' do |vars|
end end
#Test contents of role_mapping.yml #Test contents of role_mapping.yml
describe file('/etc/elasticsearch/security_node' + vars['es_xpack_conf_subdir'] + '/gcrole_mapping.yml') do describe file('/etc/elasticsearch/security_node' + vars['es_xpack_conf_subdir'] + '/role_mapping.yml') do
it { should be_owned_by 'elasticsearch' } it { should be_owned_by 'elasticsearch' }
it { should contain 'power_user:' } it { should contain 'power_user:' }
it { should contain '- cn=admins,dc=example,dc=com' } it { should contain '- cn=admins,dc=example,dc=com' }
@ -219,7 +219,7 @@ shared_examples 'xpack::init' do |vars|
end end
describe file('/etc/elasticsearch/security_node' + vars['es_xpack_conf_subdir'] + '/gcsystem_key') do describe file('/etc/elasticsearch/security_node' + vars['es_xpack_conf_subdir'] + '/system_key') do
it { should be_owned_by 'elasticsearch' } it { should be_owned_by 'elasticsearch' }
it { should be_writable.by('owner') } it { should be_writable.by('owner') }
it { should be_writable.by_user('elasticsearch') } it { should be_writable.by_user('elasticsearch') }

View file

@ -127,11 +127,11 @@ shared_examples 'xpack_standard::init' do |vars|
end end
#Test users file, users_roles and roles.yml #Test users file, users_roles and roles.yml
describe file('/etc/elasticsearch/security_node' + vars['es_xpack_conf_subdir'] + '/gcusers_roles') do describe file('/etc/elasticsearch/security_node' + vars['es_xpack_conf_subdir'] + '/users_roles') do
it { should be_owned_by 'elasticsearch' } it { should be_owned_by 'elasticsearch' }
end end
describe file('/etc/elasticsearch/security_node' + vars['es_xpack_conf_subdir'] + '/gcusers') do describe file('/etc/elasticsearch/security_node' + vars['es_xpack_conf_subdir'] + '/users') do
it { should be_owned_by 'elasticsearch' } it { should be_owned_by 'elasticsearch' }
end end

View file

@ -10,6 +10,7 @@
roles: roles:
- role: elasticsearch - role: elasticsearch
es_instance_name: "security_node" es_instance_name: "security_node"
es_xpack_license: "{{ lookup('file', '/tmp/license.json') }}"
es_config: es_config:
xpack.security.enabled: True xpack.security.enabled: True
xpack.security.authc.realms.file1.type: "file" xpack.security.authc.realms.file1.type: "file"