# Configure filebeat nginx module with ansible role

**URL:** https://discuss.elastic.co/t/configure-filebeat-nginx-module-with-ansible-role/264661
**Category:** Beats
**Tags:** beats-module, filebeat
**Created:** [February 18, 2021, 8:26am UTC](https://discuss.elastic.co/t/configure-filebeat-nginx-module-with-ansible-role/264661 "2021-02-18T08:26:50Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![elster](https://avatars.discourse-cdn.com/v4/letter/e/dbc845/32.png) [@elster](https://discuss.elastic.co/u/elster)
#### Post date: [February 18, 2021, 8:26am UTC](https://discuss.elastic.co/t/configure-filebeat-nginx-module-with-ansible-role/264661/1 "2021-02-18T08:26:51Z")

</div>

Dear experts,

Can you please lead me into the right direction how I have to customize the [GitHub - elastic/ansible-beats: Ansible Beats Role](https://github.com/elastic/ansible-beats) role so that the nginx module is enabled and working?

Thanks and br,  
Elmar

---

<div class="post-metadata">

### Author: ![elster](https://avatars.discourse-cdn.com/v4/letter/e/dbc845/32.png) [@elster](https://discuss.elastic.co/u/elster)
#### Post date: [February 18, 2021, 8:42pm UTC](https://discuss.elastic.co/t/configure-filebeat-nginx-module-with-ansible-role/264661/2 "2021-02-18T20:42:35Z")

</div>

I got it installed properly meanwhile, however I am now getting error:

```auto
Failed to connect to backoff(elasticsearch(https://*.eu-central-1.es.amazonaws.com:443/)): Connection marked as failed because the onConnect callback failed: cannot retrieve the elasticsearch license from the /_license endpoint, Filebeat requires the default distribution of Elasticsearch. Please make the endpoint accessible to Filebeat so it can verify the license.: unauthorized access, could not connect to the xpack endpoint, verify your credentials

```

It seems to be the problem described in this post [Filebeat doesn't work with AWS ES domain](https://discuss.elastic.co/t/filebeat-doesnt-work-with-aws-es-domain/255683) (oss version of filebeat has to be used) so now my question is is it possible to customize [GitHub - elastic/ansible-beats: Ansible Beats Role](https://github.com/elastic/ansible-beats) so that the oss version is installed?

Thanks and br,  
Elmar

---

<div class="post-metadata">

### Author: ![jsoriano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsoriano/32/27920_2.png) [@jsoriano](https://discuss.elastic.co/u/jsoriano)
#### Post date: [February 19, 2021, 12:11pm UTC](https://discuss.elastic.co/t/configure-filebeat-nginx-module-with-ansible-role/264661/3 "2021-02-19T12:11:43Z")

</div>

Hey @elster,

> [@elster](#):
>
> is it possible to customize [GitHub - elastic/ansible-beats: Ansible Beats Role](https://github.com/elastic/ansible-beats) so that the oss version is installed?

In theory this is supported, take a look to this change: [Allow use oss repository by robsonpeixoto · Pull Request #61 · elastic/ansible-beats · GitHub](https://github.com/elastic/ansible-beats/pull/61)

---

<div class="post-metadata">

### Author: ![elster](https://avatars.discourse-cdn.com/v4/letter/e/dbc845/32.png) [@elster](https://discuss.elastic.co/u/elster)
#### Post date: [February 19, 2021, 2:21pm UTC](https://discuss.elastic.co/t/configure-filebeat-nginx-module-with-ansible-role/264661/4 "2021-02-19T14:21:48Z")

</div>

Thanks, finally I got the oss version installed by uninstalling the original version first and then setting variable oss\_version: true.

---

<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, 2021, 4:22pm UTC](https://discuss.elastic.co/t/configure-filebeat-nginx-module-with-ansible-role/264661/5 "2021-03-19T16:22:21Z")

</div>

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