# Unable to create or destroy database in influxdb from ansible

**URL:** <https://forum.ansible.com/t/unable-to-create-or-destroy-database-in-influxdb-from-ansible/31600>\
**Category:** Ansible Project\
**Created:** [November 5, 2019, 8:02pm UTC](https://forum.ansible.com/t/unable-to-create-or-destroy-database-in-influxdb-from-ansible/31600 "2019-11-05T20:02:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Irfan\_Pasha](https://avatars.discourse-cdn.com/v4/letter/i/85f322/32.png) [@Irfan\_Pasha](https://forum.ansible.com/u/Irfan_Pasha)\
**Post date:** [November 5, 2019, 8:02pm UTC](https://forum.ansible.com/t/unable-to-create-or-destroy-database-in-influxdb-from-ansible/31600/1 "2019-11-05T20:02:23Z")

</div>

Hi,

I was trying to run ansible commands influxdb\_database to create and destroy databases and I seeing errors with it.

The ansible command look like this

- name: Destroy database  
influxdb\_database:  
hostname: “{{ ansible\_hostname }}”  
database\_name: jmeter  
state: absent

- name: Create database  
influxdb\_database:  
hostname: “{{ ansible\_hostname }}”  
database\_name: jmeter  
state: present

While running this, I get the error from ansible. If I run the same command from curl, then it works fine. Did anyone see this problem ? BTW, I am seeing this problem recently. Earlier I did not see this problem with the same setup. I think this may be a bug with 1.7.9 version of influxdb. I was working with 1.7.8 earlier.

HTTPConnectionPool(host=‘terraform-test’, port=8086): Max retries exceeded with url: /query?q=SHOW+DATABASES&db=jmeter (Caused by NewConnectionError('\<urllib3.connection.HTTPConnection object at 0x7f8e82be4d50\>: Failed to establish a new connection: [Errno 111] Connection refused
