ansible-zabbix-server
ansible-zabbix-server copied to clipboard
move db creation file to delegated_dbhost
Description of PR
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.
Type of change
Bugfix Pull Request
Fixes an issue
it fixes #96.
Hi @oskapt
The CI test failed with error:
TASK [ansible-zabbix-server : MySQL | Create database and import file >= 3.0] ***
skipping: [zabbix-server-pgsql-centos]
skipping: [zabbix-server-pgsql-debian]
skipping: [zabbix-server-pgsql-ubuntu]
fatal: [zabbix-server-mysql-centos -> zabbix-server-mysql-centos]: FAILED! => {"changed": false, "failed": true, "msg": "target /var/tmp/zabbix-server-mysql-centos//usr/share/doc/zabbix-server-mysql-3.4.11/create.sql.gz does not exist on the host"}
fatal: [zabbix-server-mysql-debian -> zabbix-server-mysql-debian]: FAILED! => {"changed": false, "failed": true, "msg": "target /var/tmp/zabbix-server-mysql-debian//usr/share/doc/zabbix-server-mysql/create.sql.gz does not exist on the host"}
fatal: [zabbix-server-mysql-ubuntu -> zabbix-server-mysql-ubuntu]: FAILED! => {"changed": false, "failed": true, "msg": "target /var/tmp/zabbix-server-mysql-ubuntu//usr/share/doc/zabbix-server-mysql/create.sql.gz does not exist on the host"}
TASK [ansible-zabbix-server : Check if we have sql_done files >= 3.0] **********
skipping: [zabbix-server-pgsql-centos]
skipping: [zabbix-server-pgsql-debian]
skipping: [zabbix-server-pgsql-ubuntu]
Could you please take a look at it? Thanks!
i have a local change that should fix this, but i'm unable to test it without building a new zabbix system for testing. how can i replicate your CI environment? i'd like to know that everything works before updating the PR.
Install Molecule and do a molecule test. If this exit with a status code of 0 than all is fine. See: https://molecule.readthedocs.io/en/latest/
@oskapt
How is it going? Do you need some help? Should I take a look at how to implement this and maybe add it to the molecule tests?