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/ to run the integration tests.
More information about running the role with xpack can be found in the roles readme (installing xpack 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 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 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!