# X-pack with ansible role license failing

**URL:** <https://discuss.elastic.co/t/x-pack-with-ansible-role-license-failing/119807>\
**Category:** Elasticsearch\
**Created:** [February 14, 2018, 1:51pm UTC](https://discuss.elastic.co/t/x-pack-with-ansible-role-license-failing/119807 "2018-02-14T13:51:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cchaffee](https://avatars.discourse-cdn.com/v4/letter/c/bcef8e/32.png) [@cchaffee](https://discuss.elastic.co/u/cchaffee)\
**Post date:** [February 14, 2018, 1:51pm UTC](https://discuss.elastic.co/t/x-pack-with-ansible-role-license-failing/119807/1 "2018-02-14T13:51:50Z")

</div>

Hello, currently trying to run the ansible playbooks from this repo:

> **[elastic/ansible-elasticsearch](https://github.com/elastic/ansible-elasticsearch)**
>
> ansible-elasticsearch - Ansible playbook for Elasticsearch

Running the xpack-centos-7 test suite but when it gets to the license part it fails because it doesn't have a license for the security features. I am doing inspec building with elastic and need to get the x-pack playbook working so I can run the verifier. This is the playbook that runs: ([https://github.com/elastic/ansible-elasticsearch/blob/master/test/integration/xpack.yml](https://github.com/elastic/ansible-elasticsearch/blob/master/test/integration/xpack.yml)).

I've read that a trial license should generate upon installation of elastic, but that doesn't appear to be the case here. Anyone have some guidance on running config management code with X-pack? Running into a bit of a wall.

Edit: here's the part in the documentation saying the license should generate during x-pack plugin install

[https://www.elastic.co/guide/en/x-pack/current/license-management.html](https://www.elastic.co/guide/en/x-pack/current/license-management.html)

---

<div class="post-metadata">

**Author:** ![michael.russell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michael.russell/32/27889_2.png) [@michael.russell](https://discuss.elastic.co/u/michael.russell)\
**Post date:** [February 19, 2018, 8:35am UTC](https://discuss.elastic.co/t/x-pack-with-ansible-role-license-failing/119807/2 "2018-02-19T08:35:16Z")

</div>

Hi @cchaffee!

The role expects the local path to the xpack license to be specified in the environment variable ES\_XPACK\_LICENSE\_FILE. You can generate a suitable license at [https://register.elastic.co/](https://register.elastic.co/) to run the integration tests.

```
export ES_XPACK_LICENSE_FILE="$(pwd)/license.json" 
kitchen converge

```

More information about running the role with xpack can be found in the roles [readme (installing xpack features)](https://github.com/elastic/ansible-elasticsearch#installing-x-pack-features).

At the top of my todo list is to add better automation and documentation about running the local development environment so thanks for this feedback since it is really useful! Please do let me know if you run into more problems getting the dev environment working so I can make sure it is properly documented and as easy as possible to get running.

> Edit: here's the part in the documentation saying the license should generate during x-pack plugin install

This is true and it makes a lot of sense for testing out the xpack features. However it is expected that most people who are installing an xpack enabled cluster with this role are setting it up for production use and would want to do so with a proper xpack license.

I would be open to the idea of having a variable (that isn't the default) which would let the role use xpack with the autogenerated license to make local development just a little bit easier. Please open a new [feature request](https://github.com/elastic/ansible-elasticsearch/issues/new) if you like the idea too!

P.S. Sorry for the late reply I just got back from holidays. In the future I would recommend creating an issue directly in [GitHub - elastic/ansible-elasticsearch: Ansible playbook for Elasticsearch](https://github.com/elastic/ansible-elasticsearch) since I will get notified immediately and other users of the role might be able to help out too!

Cheers,

Michael

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 19, 2018, 8:35am UTC](https://discuss.elastic.co/t/x-pack-with-ansible-role-license-failing/119807/3 "2018-03-19T08:35:18Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
