# Ansible failing to manage influxdb

**URL:** <https://forum.ansible.com/t/ansible-failing-to-manage-influxdb/33585>\
**Category:** Ansible Project\
**Created:** [August 11, 2020, 12:45pm UTC](https://forum.ansible.com/t/ansible-failing-to-manage-influxdb/33585 "2020-08-11T12:45:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Miroslav\_Todorovic](https://avatars.discourse-cdn.com/v4/letter/m/3da27b/32.png) [@Miroslav\_Todorovic](https://forum.ansible.com/u/Miroslav_Todorovic)\
**Post date:** [August 11, 2020, 12:45pm UTC](https://forum.ansible.com/t/ansible-failing-to-manage-influxdb/33585/1 "2020-08-11T12:45:15Z")

</div>

I am facing issue with managing inflluxdb on remote host using influxdb\_database module.

- name: Create database  
influxdb\_database:  
hostname: localhost  
database\_name: miroslav

It is failing with following error:  
“ImportError: No module named influxdb. Failed to import the required Python library (influxdb)”

When I run ansible on host where influxdb is running, it works fine. I suspect on bug in this module.  
Does anyone have this module works when managing influxdb on remote host?

---

<div class="post-metadata">

**Author:** ![Luca\_remix\_tj\_Lorenz](https://avatars.discourse-cdn.com/v4/letter/l/ea666f/32.png) [@Luca\_remix\_tj\_Lorenz](https://forum.ansible.com/u/Luca_remix_tj_Lorenz)\
**Post date:** [August 11, 2020, 12:51pm UTC](https://forum.ansible.com/t/ansible-failing-to-manage-influxdb/33585/2 "2020-08-11T12:51:44Z")

</div>

Hello,

the error appears because you're missing influxdb python module on the  
host you're targeting with ansible.

Luca

---

<div class="post-metadata">

**Author:** ![Hrvoje\_Gaspar](https://avatars.discourse-cdn.com/v4/letter/h/3ab097/32.png) [@Hrvoje\_Gaspar](https://forum.ansible.com/u/Hrvoje_Gaspar)\
**Post date:** [August 11, 2020, 12:54pm UTC](https://forum.ansible.com/t/ansible-failing-to-manage-influxdb/33585/3 "2020-08-11T12:54:43Z")

</div>

Could you check versions of influxdb and python you are running on managed host?

Influx should be between versions 0.9 and 1.2.4, while python needs to be version 2.6:  
[https://docs.ansible.com/ansible/latest/modules/influxdb\_database\_module.html](https://docs.ansible.com/ansible/latest/modules/influxdb_database_module.html)

Dana utorak, 11. kolovoza 2020. u 14:45:15 UTC+2 korisnik [miroslav....@nutanix.com](mailto:miroslav....@nutanix.com) napisao je:

---

<div class="post-metadata">

**Author:** ![racke](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/racke/32/4767_2.png) [@racke](https://forum.ansible.com/u/racke)\
**Post date:** [August 11, 2020, 2:44pm UTC](https://forum.ansible.com/t/ansible-failing-to-manage-influxdb/33585/4 "2020-08-11T14:44:30Z")

</div>

> Could you check versions of influxdb and python you are running on managed host?
> 
> Influx should be between versions 0.9 and 1.2.4, while python needs to be version 2.6:  
> [https://docs.ansible.com/ansible/latest/modules/influxdb\_database\_module.html](https://docs.ansible.com/ansible/latest/modules/influxdb_database_module.html)

Version 2.6 or later :-), so this should be a given for most distributions.

Regards  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Racke

---

<div class="post-metadata">

**Author:** ![Miroslav\_Todorovic](https://avatars.discourse-cdn.com/v4/letter/m/3da27b/32.png) [@Miroslav\_Todorovic](https://forum.ansible.com/u/Miroslav_Todorovic)\
**Post date:** [August 11, 2020, 8:07pm UTC](https://forum.ansible.com/t/ansible-failing-to-manage-influxdb/33585/5 "2020-08-11T20:07:20Z")

</div>

Hi,

Thank you Luca, you were right. I was missing influxdb in targeted host. I was assuming all the time that dependency referred to host where ansible was running.  
Thank you a lot once again!

Miroslav
