Skip to content
This repository has been archived by the owner on May 23, 2020. It is now read-only.

installation does not create database on remote host #96

Closed
oskapt opened this issue Jul 20, 2018 · 1 comment · May be fixed by #97
Closed

installation does not create database on remote host #96

oskapt opened this issue Jul 20, 2018 · 1 comment · May be fixed by #97

Comments

@oskapt
Copy link

oskapt commented Jul 20, 2018

Describe the bug

If using a remote db host, the role sets delegated_db_host and uses this later to install create.sql.gz. The problem is that create.sql.gz exists on the Zabbix host, not on the remote db host.

TASK [zabbix-server : MySQL | Create database and import file >= 3.0] ***********************************************************************
fatal: [zabbix -> support.scl01.filon.tech]: FAILED! => {"changed": false, "msg": "target /usr/share/doc/zabbix-server-mysql/create.sql.gz does not exist on the host"}

Installation method/version

  • Github / latest

Ansible Version

ansible 2.5.2
  config file = /home/ubuntu/ansible/ansible.cfg
  configured module search path = [u'/home/ubuntu/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /home/ubuntu/ansible/venv/local/lib/python2.7/site-packages/ansible
  executable location = /home/ubuntu/ansible/venv/bin/ansible
  python version = 2.7.12 (default, Dec  4 2017, 14:50:18) [GCC 5.4.0 20160609]

Targetted hosts
Concerns the following OS(es):

  • Ubuntu

Expected behavior

The database should have been installed.

Additional context

I'm working on a resolution and will submit a PR if it works.

oskapt added a commit to oskapt/ansible-zabbix-server that referenced this issue Jul 22, 2018
This change will retrieve the file used to initialize the database and then copy it to the `delegated_dbhost` before loading it.  it intentionally does not remove the file afterward, in case something goes wrong and the file needs to be re-imported. it also only executes for the series of conditions around zabbix `>=3.0` and was only tested on Ubuntu.

it resolves dj-wasabi#96.
@dj-wasabi
Copy link
Owner

Outdated. If this still is an issue, please open a new PR in the repository on https://github.com/ansible-collections/community.zabbix/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants