zcat在ansible剧本中失败

zcat在ansible剧本中失败,ansible,zabbix,zcat,Ansible,Zabbix,Zcat,我正在尝试导入架构,但失败,请建议我解决此错误 - name: Import the initial schema command: zcat /usr/share/doc/zabbix-server-mysql-3.2.5/create.sql.gz | mysql -uzabbix -p zabbix TASK: [zabbix-server | Import the initial schema] ***************************** failed: [10.1

我正在尝试导入架构,但失败,请建议我解决此错误

- name: Import the initial schema
  command: zcat /usr/share/doc/zabbix-server-mysql-3.2.5/create.sql.gz | mysql -uzabbix -p zabbix

TASK: [zabbix-server | Import the initial schema] *****************************
failed: [10.100.140.120] => {"changed": true, "cmd": ["zcat", "/usr/share/doc/zabbix-server-mysql-3.2.5/create.sql.gz", "|", "mysql", "-u", "zabbix", "-p", "zabbix",   "zabbix"], "delta": "0:00:00.003563", "end": "2017-05-01 11:03:46.004996", "rc": 1, "start": "2017-05-01 11:03:46.001433", "warnings": []}
stderr: gzip: invalid option -- 'u'
Try `gzip --help' for more information.
我的日志显示zabbix.users不存在

3862:20170501:112105.959 using configuration file: /etc/zabbix/zabbix_server.conf
  3862:20170501:112105.962 [Z3005] query failed: [1146] Table 'zabbix.users' doesn't exist [select userid from users limit 1]
  3862:20170501:112105.962 cannot use database "zabbix": database is not a Zabbix database
  3913:20170501:112116.213 Starting Zabbix Server. Zabbix 3.2.5 (revision 67445).

Ansible的
命令
模块不支持shell
|
管道或类似的东西,只支持简单的命令和参数。您需要使用create.sql.gz文件,或者更好,将create.sql.gz文件发送到主机,然后使用whichfeatures
状态:import
Ansible的
命令
模块不支持shell
管道或类似的东西,只支持简单的命令和参数。您需要将create.sql.gz文件发送到主机,然后使用which features
state:import
,甚至更好