Closed Blufaer closed 4 years ago
what if comment string #zabbix_agent_package: zabbix-agent and package version i don't specify package on playbook and no problem with install package
I tried and unfortunately it did not help, but thanks for the help
it seems to me that the package manager itself does not work
(1, 'sudo: unable to resolve host ht-msk-kor41-020-svirt-13\r\n\r\n\r\n{"exception": " File \\"/tmp/ansible_apt_payload_vfq1k9c9/__main__.py\\", line 345, in package_status\\n pkg = cache[pkgname]\\n File \\"/usr/lib/python3/dist-packages/apt/cache.py\\", line 233, in __getitem__\\n raise KeyError(\'The cache has no package named %r\' % key)\\n", "invocation": {"module_args": {"pkg": "zabbix-agent - zabbix-agent - zabbix-sender - zabbix-get", "only_upgrade": false, "cache_valid_time": 0, "upgrade": null, "force_apt_get": false, "purge": false, "default_release": null, "update_cache": true, "force": false, "allow_unauthenticated": false, "autoremove": false, "dpkg_options": "force-confdef,force-confold", "autoclean": false, "package": ["zabbix-agent - zabbix-agent - zabbix-sender - zabbix-get"], "deb": null, "state": "present", "install_recommends": null}}, "msg": "No package matching \'zabbix-agent - zabbix-agent - zabbix-sender - zabbix-get\' is available", "failed": true}\r\n', 'Shared connection to 10.0.13.43 closed.\r\n')
<10.0.****> ESTABLISH SSH CONNECTION FOR USER: extadmin
<10.0.****> SSH: EXEC sshpass -d12 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o User=extadmin -o ConnectTimeout=40 -o ControlPath=/home/user/.ansible/cp/06110fbc60 10.0.13.43 '/bin/sh -c '"'"'rm -f -r /home/extadmin/.ansible/tmp/ansible-tmp-1547119821.27-136057596517763/ > /dev/null 2>&1 && sleep 0'"'"''
<10.0.1****> (0, '', '')
The full traceback is:
File "/tmp/ansible_apt_payload_vfq1k9c9/__main__.py", line 345, in package_status
pkg = cache[pkgname]
File "/usr/lib/python3/dist-packages/apt/cache.py", line 233, in __getitem__
raise KeyError('The cache has no package named %r' % key)
fatal: [ht-msk-kor41-020-svirt-13]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"allow_unauthenticated": false,
"autoclean": false,
"autoremove": false,
"cache_valid_time": 0,
"deb": null,
"default_release": null,
"dpkg_options": "force-confdef,force-confold",
"force": false,
"force_apt_get": false,
"install_recommends": null,
"only_upgrade": false,
"package": [
"zabbix-agent - zabbix-agent - zabbix-sender - zabbix-get"
],
"pkg": "zabbix-agent - zabbix-agent - zabbix-sender - zabbix-get",
"purge": false,
"state": "present",
"update_cache": true,
"upgrade": null
}
},
"msg": "No package matching 'zabbix-agent - zabbix-agent - zabbix-sender - zabbix-get' is available"
}
Hi @Blufaer
Is this still the case? Do you have this issue also on other hosts in your environments? It seems to me an issue with the host itself and not specifically to this role.
I got the same problem.
My system is Ubuntu 18.04.3 LTS
This is the error from ansible:
TASK [dj-wasabi.zabbix-agent : Debian | Installing deb repository Ubuntu] ********************
changed: [10.0.0.204]
TASK [dj-wasabi.zabbix-agent : Debian | Installing zabbix-agent] *****************************
FAILED - RETRYING: Debian | Installing zabbix-agent (3 retries left).
FAILED - RETRYING: Debian | Installing zabbix-agent (2 retries left).
FAILED - RETRYING: Debian | Installing zabbix-agent (1 retries left).
fatal: [10.0.0.204]: FAILED! => {"attempts": 3, "changed": false, "msg": "No package matching 'zabbix-sender' is available"}
PLAY RECAP ***********************************************************************************
10.0.0.204 : ok=7 changed=3 unreachable=0 failed=1 skipped=13 rescued=0 ignored=0
This is out put of apt search zabbix
zabbix-agent/bionic 1:3.0.12+dfsg-1 amd64
network monitoring solution - agent
zabbix-cli/bionic,bionic 1.7.0-1 all
Command-line interface for Zabbix monitoring system
zabbix-frontend-php/bionic,bionic 1:3.0.12+dfsg-1 all
network monitoring solution - PHP front-end
zabbix-java-gateway/bionic,bionic 1:3.0.12+dfsg-1 all
network monitoring solution - Java gateway
zabbix-proxy-mysql/bionic 1:3.0.12+dfsg-1 amd64
network monitoring solution - proxy (using MySQL)
zabbix-proxy-pgsql/bionic 1:3.0.12+dfsg-1 amd64
network monitoring solution - proxy (using PostgreSQL)
zabbix-proxy-sqlite3/bionic 1:3.0.12+dfsg-1 amd64
network monitoring solution - proxy (using SQLite3)
zabbix-server-mysql/bionic 1:3.0.12+dfsg-1 amd64
network monitoring solution - server (using MySQL)
zabbix-server-pgsql/bionic 1:3.0.12+dfsg-1 amd64
network monitoring solution - server (using PostgreSQL)
Hi @asurinsaka / @Blufaer
Is there a way to replicate this problem? I'm not able to get this issue replicated and therefor I can not solve it.
I have the same trouble: Ansible host Ubuntu 18.04 Ansible 2.9.4-1ppa~bionic
Remote host: Ubuntu 16.04 aarch64
Console:
apt install zabbix-sender
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package zabbix-sender
There isn't zabbix-sender package in Ubuntu 16.04: zabbix_sander utilite is in zabbix_agent package But there is in zabbix repo. But zabbix repo only for amd64 and i386. Not for aarch64
Will close this issue as role is being transferred to the Zabbix Collection. A new issue in the collection is created for this bug.
Describe the bug While running the script, I get an error fatal: [*****]: FAILED! => {"changed": false, "msg": "No package matching 'zabbix-agent - zabbix-agent - zabbix-sender - zabbix-get' is available"}
Installation method/version ansible 2.7.5 config file = /home/user/ansible-zabbix-agent/ansible.cfg configured module search path = [u'/home/user/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/dist-packages/ansible executable location = /usr/bin/ansible python version = 2.7.15rc1 (default, Nov 12 2018, 14:31:15) [GCC 7.3.0]
Github using master
hosts - Ubuntu Debian CentOS
Additional context
playbook works well up to a TASK [dj-wasabi.zabbix-agent : Debian | Installing zabbix-agent]
On Centos i have same problem
if I go to a managed host and see the availability of the packages -
At the same time using the command ansible -m command -a "apt-get install zabbix-agent -y" hosts Agent setup ok
Log exsample user@***###########:~/ansible-zabbix-agent$ sudo ansible-playbook tabak-ht-playbook.yml --diff