dj-wasabi / ansible-zabbix-web

Installing and maintaining zabbix-web for RedHat/Debian/Ubuntu.
https://galaxy.ansible.com/dj-wasabi/zabbix-web/
MIT License
25 stars 56 forks source link

Add unresolvable zabbix_server_hostname to /etc/hosts; Closes dj-wasabi/ansible-zabbix-web#65 #66

Closed kr4ut closed 4 years ago

kr4ut commented 5 years ago

Description of PR bi/ansible-zabbix-web#65

Type of change Bugfix Pull Request

Fixes an issue dj-wasabi/ansible-zabbix-web#65

kr4ut commented 5 years ago

@dj-wasabi Can you help me out here about requirements for dig lookup and ipaddr filter? Don't fully understand the TravisCI setup here but thought should be the same like in zabbix-agent?

dj-wasabi commented 5 years ago

Hi @kr4ut

Sorry for late reply, but the correct package is now installed with travis.

It fails now on this:

fatal: [zabbix-web-pgsql-centos]: FAILED! => {"msg": "The conditional check 'not lookup('dig', 'qtype=A', zabbix_server_hostname ) | ipaddr' failed. The error was: An unhandled exception occurred while running the lookup plugin 'dig'. Error was a <class 'ansible.errors.AnsibleError'>, original message: The dig lookup requires the python 'dnspython' library and it is not installed\n\nThe error appears to have been in '/home/travis/build/dj-wasabi/ansible-zabbix-web/tasks/main.yml': line 56, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: \"Add unresolvable $ZBX_SERVER as 127.0.1.1 to /etc/hosts\"\n ^ here\n"}

hatifnatt commented 5 years ago

Please also consider adding an option to disable this. Not everyone want to modify hosts file while installing Zabbix frontend.

dj-wasabi commented 4 years ago

True. Role should not be responsible for adding entries to a hosts file.