I have read the documentation and install module zabbix-api on host and python version is 2.7..On the ansible server:
ansible 2.4.2.0 config file = /ansible/ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.6/site-packages/ansible executable location = /usr/bin/ansible python version = 2.6.6 (r266:84292, Aug 18 2016, 15:13:37) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] python --version 2.7 my play is - hosts: zabbix tasks: - name: This is installation zabbix_maintenance: name: Zabbix123 host_groups: Discovered host,Linux servers state: present minutes: 90 server_url: http://zabbix.patrol.net <http://zabbix.socialpatrol.net/> login_user: Admin login_password: yORK desc: Setting up maintenance window for builds my issue is that when I try to run ansible-playbook playbook.yaml I keep getting the error: TASK [This is installation] ********************************************************** fatal: [zabbix_server]: FAILED! => {"changed": false, "msg": "Missing required zabbix-api module (check docs or install with: pip install zabbix-api)"} to retry, use: --limit @/ansible/playbook.retry The full traceback is: File "/tmp/ansible_XXjWDO/ansible_module_zabbix_maintenance.py", line 164, in <module> from zabbix_api import ZabbixAPI fatal: [zabbix_server]: FAILED! => { "changed": false, "invocation": { "module_args": { "collect_data": true, "desc": "Setting up maintenance window for builds", "host_groups": [ "Discovered host", "Linux servers" ], "host_names": null, "http_login_password": null, "http_login_user": null, "login_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "login_user": "Admin", "minutes": 90, "name": "Zabbix123", "server_url": "http:/l.net", "state": "present", "timeout": 10 } }, "msg": "Missing required zabbix-api module (check docs or install with: pip install zabbix-api)" -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/e89e50c2-38ad-4a4e-bb6c-5bd3f31791b1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.