use include_vars to include license during tests

This commit is contained in:
Thierno IB. BARRY 2016-09-27 16:59:20 +02:00
parent 61a3ba32c5
commit 5da67786e2
2 changed files with 4 additions and 4 deletions

View file

@ -1,4 +1,4 @@
---
- name: Activate ES license (without shield authentication)
uri:
method: PUT
@ -11,7 +11,7 @@
when: '"shield" not in es_xpack_features
failed_when: >
license_activated.status != 200 or
license_activated.json.license_status is not defined or
license_activated.json.license_status is not defined or
license_activated.json.license_status != 'valid'
- name: Activate ES license (with shield authentication)
@ -29,7 +29,7 @@
when: '"shield" in es_xpack_features
failed_when: >
license_activated.status != 200 or
license_activated.json.license_status is not defined or
license_activated.json.license_status is not defined or
license_activated.json.license_status != 'valid'
- debug:

View file

@ -5,10 +5,10 @@
- { 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
es_xpack_license: <%= ENV['ES_XPACK_LICENSE'] %>
es_plugins:
- plugin: lmenezes/elasticsearch-kopf
version: master