Comments (11)
This happens via command line as well, this is an issue with Zabbix, and not with Ansible. I suggest closing this bug report out.
yum install zabbix-server zabbix-server-pgsql
Loaded plugins: fastestmirror
Determining fastest mirrors
* base: centos.mirror.sharkservers.co.uk
* extras: centos.mirror.sharkservers.co.uk
* updates: mirror.jgotteswinter.com
base | 3.7 kB 00:00
base/primary_db | 4.6 MB 00:00
extras | 3.3 kB 00:00
extras/primary_db | 19 kB 00:00
updates | 3.4 kB 00:00
updates/primary_db | 150 kB 00:00
zabbix | 951 B 00:00
zabbix/primary | 9.2 kB 00:00
zabbix 49/49
zabbix-non-supported | 951 B 00:00
zabbix-non-supported/primary | 3.8 kB 00:00
zabbix-non-supported 15/15
Setting up Install Process
Package zabbix-server-2.4.1-1.el6.x86_64 already installed and latest version
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
--> Running transaction check
---> Package zabbix-server-pgsql.x86_64 0:2.4.1-1.el6 will be installed
--> Processing Dependency: postgresql for package: zabbix-server-pgsql-2.4.1-1.el6.x86_64
--> Processing Dependency: libpq.so.5()(64bit) for package: zabbix-server-pgsql-2.4.1-1.el6.x86_64
--> Running transaction check
---> Package postgresql.x86_64 0:8.4.20-1.el6_5 will be installed
---> Package postgresql-libs.x86_64 0:8.4.20-1.el6_5 will be installed
--> Processing Conflict: zabbix-server-mysql-2.4.1-1.el6.x86_64 conflicts zabbix-server-pgsql
--> Processing Conflict: zabbix-server-pgsql-2.4.1-1.el6.x86_64 conflicts zabbix-server-mysql
--> Finished Dependency Resolution
Error: zabbix-server-mysql conflicts with zabbix-server-pgsql-2.4.1-1.el6.x86_64
Error: zabbix-server-pgsql conflicts with zabbix-server-mysql-2.4.1-1.el6.x86_64
You could try using --skip-broken to work around the problem
** Found 4 pre-existing rpmdb problem(s), 'yum check' output follows:
cpp-4.4.7-11.el6.x86_64 is a duplicate with cpp-4.4.7-4.el6.x86_64
flex-2.5.35-9.el6.x86_64 is a duplicate with flex-2.5.35-8.el6.x86_64
libgfortran-4.4.7-11.el6.x86_64 is a duplicate with libgfortran-4.4.7-4.el6.x86_64
libgomp-4.4.7-11.el6.x86_64 is a duplicate with libgomp-4.4.7-4.el6.x86_64
from ansible-modules-core.
I don't know why but that never happens to me. Here is my output:
# yum install zabbix-server zabbix-server-pgsql
Loaded plugins: fastestmirror
Determining fastest mirrors
epel/metalink | 28 kB 00:00
* base: centos.hyve.com
* epel: epel.check-update.co.uk
* extras: centos.serverspace.co.uk
* ius: mirror.amsiohosting.net
* updates: centos.serverspace.co.uk
base | 3.7 kB 00:00
base/primary_db | 4.6 MB 00:00
elasticsearch-1.2 | 2.5 kB 00:00
epel | 4.4 kB 00:00
epel/primary_db | 6.3 MB 00:00
extras | 3.3 kB 00:00
extras/primary_db | 19 kB 00:00
ius | 2.1 kB 00:00
ius/primary_db | 153 kB 00:00
nginx | 2.9 kB 00:00
nginx/primary_db | 34 kB 00:00
updates | 3.4 kB 00:00
updates/primary_db | 150 kB 00:00
zabbix | 951 B 00:00
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package zabbix-server.x86_64 0:2.4.1-1.el6 will be installed
--> Processing Dependency: OpenIPMI-libs >= 2.0.14 for package: zabbix-server-2.4.1-1.el6.x86_64
--> Processing Dependency: iksemel for package: zabbix-server-2.4.1-1.el6.x86_64
--> Processing Dependency: net-snmp for package: zabbix-server-2.4.1-1.el6.x86_64
--> Processing Dependency: unixODBC for package: zabbix-server-2.4.1-1.el6.x86_64
--> Processing Dependency: fping for package: zabbix-server-2.4.1-1.el6.x86_64
---> Package zabbix-server-pgsql.x86_64 0:2.4.1-1.el6 will be installed
--> Processing Dependency: postgresql for package: zabbix-server-pgsql-2.4.1-1.el6.x86_64
--> Processing Dependency: libpq.so.5()(64bit) for package: zabbix-server-pgsql-2.4.1-1.el6.x86_64
--> Processing Dependency: libnetsnmp.so.20()(64bit) for package: zabbix-server-pgsql-2.4.1-1.el6.x86_64
--> Running transaction check
---> Package OpenIPMI-libs.x86_64 0:2.0.16-14.el6 will be installed
---> Package fping.x86_64 0:2.4b2-10.el6 will be installed
---> Package iksemel.x86_64 0:1.4-2.el6 will be installed
--> Processing Dependency: libgnutls.so.26(GNUTLS_1_4)(64bit) for package: iksemel-1.4-2.el6.x86_64
--> Processing Dependency: libgnutls.so.26()(64bit) for package: iksemel-1.4-2.el6.x86_64
---> Package net-snmp.x86_64 1:5.5-50.el6_6.1 will be installed
--> Processing Dependency: libsensors.so.4()(64bit) for package: 1:net-snmp-5.5-50.el6_6.1.x86_64
---> Package net-snmp-libs.x86_64 1:5.5-50.el6_6.1 will be installed
---> Package postgresql.x86_64 0:8.4.20-1.el6_5 will be installed
---> Package postgresql-libs.x86_64 0:8.4.20-1.el6_5 will be installed
---> Package unixODBC.x86_64 0:2.2.14-14.el6 will be installed
--> Processing Dependency: libltdl.so.7()(64bit) for package: unixODBC-2.2.14-14.el6.x86_64
--> Running transaction check
---> Package gnutls.x86_64 0:2.8.5-14.el6_5 will be installed
---> Package libtool-ltdl.x86_64 0:2.2.6-15.5.el6 will be installed
---> Package lm_sensors-libs.x86_64 0:3.1.1-17.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=======================================================================================================================================
Package Arch Version Repository Size
=======================================================================================================================================
Installing:
zabbix-server x86_64 2.4.1-1.el6 zabbix 21 k
zabbix-server-pgsql x86_64 2.4.1-1.el6 zabbix 1.5 M
Installing for dependencies:
OpenIPMI-libs x86_64 2.0.16-14.el6 base 473 k
fping x86_64 2.4b2-10.el6 epel 31 k
gnutls x86_64 2.8.5-14.el6_5 base 346 k
iksemel x86_64 1.4-2.el6 epel 48 k
libtool-ltdl x86_64 2.2.6-15.5.el6 base 44 k
lm_sensors-libs x86_64 3.1.1-17.el6 base 38 k
net-snmp x86_64 1:5.5-50.el6_6.1 updates 306 k
net-snmp-libs x86_64 1:5.5-50.el6_6.1 updates 1.5 M
postgresql x86_64 8.4.20-1.el6_5 base 2.6 M
postgresql-libs x86_64 8.4.20-1.el6_5 base 201 k
unixODBC x86_64 2.2.14-14.el6 base 378 k
Transaction Summary
=======================================================================================================================================
Install 13 Package(s)
Total download size: 7.4 M
Installed size: 29 M
Is this ok [y/N]:
from ansible-modules-core.
The way with_items works, is it will loop through the job for each item.
So when zabbix-server is installed first, it installs zabbix-server-mysql. If you tried to install zabbix-server-pgsql after that you would get the conflict we are seeing.
Therefore the bug is not with with_items
However, I do believe a bug is present because the also failed.
- name: Install Zabbix Repo
yum: name=http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm state=present
- name: Install Zabbix
yum: name=zabbix-server,zabbix-server-pgsql state=present
This should have been comparable to yum install zabbix-server zabbix-server-pgsql in my opinion, and it clearly is not actually doing that, it is still installing one at a time which causes the error.
If you reverse the order it works, which proves its installing it one at a time.
seperated
- name: Install Zabbix Repo
yum: name=http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm state=present
- name: Install Zabbix
yum: name=zabbix-server-pgsql,zabbix-server state=present
So the bug that needs to be addressed, is how yum module installs things one at a time, instead of as one transaction if listed on the same line and separated by commas.
On a side note, installing zabbix-server-pgsql installs zabbix-server as a dependency so you do not actually need to list both.seperated
from ansible-modules-core.
The yum module works differently in combination with with_items
than most other modules due to some magic behind the scenes.
when using yum, Ansible will concatenation the list of packages to install into a single yum invocation and not multiple runs like other modules.
from ansible-modules-core.
ah cool, then the issue is the same, its installing one a time whether with_items is used or not it would appear
from ansible-modules-core.
It seems I'm having the same problem. Maybe I'm missing something, but I'm not seeing in yum.py -> install(...)
where it's concatenating the items
together. It seems to be doing a cmd = yum_basecmd + ['install', pkg]
for each item in items.
from ansible-modules-core.
@koebbe It is installing them one at a time basically. And the zabbix module installs zabbix-mysql if installed by itself, it then tries to install zabbix-psql which conflicts with zabbix-mysql and fails. I think this is expected behavior, and as such I am not sure what should be done.
@bcoca @abadger Any ideas on how you want the community to solve this specific issue?
from ansible-modules-core.
to clear up, the with_items optimization with some modules makes it take the list at 1 time, instead of executing the module each time per item in list (with file transfer and execution), not that the module itself runs all items at once in the command line (which it can or cannot depending on module author).
I would look into why the author iterates over each package (probably to do correct reporting) before changing the way the module operates.
from ansible-modules-core.
I would rather have yum run a lot faster with a long list of packages (install them in one command), than to have detailed reporting which package was installed, removed,... But it should be possible to have both.
from ansible-modules-core.
This is resolved by pull request #1501
from ansible-modules-core.
Thanks for the PR! merged that so this should now be resolved.
Closing This Ticket
Hi!
We believe recent commits (likely detailed above) should resolve this question or problem for you.
This will also be included in the next major release.
If you continue seeing any problems related to this issue, or if you have any further questions, please let us know by stopping by one of the two mailing lists, as appropriate:
- https://groups.google.com/forum/#!forum/ansible-project - for user questions, tips, and tricks
- https://groups.google.com/forum/#!forum/ansible-devel - for strategy, future planning, and questions about writing code
Because this project is very active, we're unlikely to see comments made on closed tickets, but the mailing list is a great way to ask questions, or post if you don't think this particular
issue is resolved.
Thank you!
from ansible-modules-core.
Related Issues (20)
- .. HOT 1
- azure_rm_deployment: InvalidClientIdError: (invalid_request) AADSTS90002: Requested tenant identifier 'xxxxxx.com'' is not valid. HOT 1
- 'dict object' has no attribute 'stdout' HOT 1
- unarchive does not work for .zip file on ansible 2.2.1 on windows Environment HOT 1
- async polling doesnt work HOT 1
- ansible_s3 does not support delegate_to HOT 2
- vyos_config has timeout after some unknown number of commands HOT 1
- Include_vars in free-form mode requires a file extension, breaking reverse compatibility HOT 1
- pushing jinja2 configurations on to network devices HOT 1
- 'list' object has no attribute 'items'\r\n" HOT 3
- Cisco Nexus N3K - QinQ issue HOT 1
- "msg": "failed to create temporary content file: timed out". Can someone help me on this. HOT 1
- Uri module modifies + sign to spaces HOT 1
- template error while templating string: unexpected ']' After Dictionary Combine HOT 1
- Yum install with Corrupt repo endless loop HOT 1
- ios_command failure for cisco with rc=1 HOT 2
- nxos_interface module does not work HOT 1
- ios_config backup not working on windows shared drive HOT 2
- ansible_module_azure_rm_virtualmachine incompatible with Python3 HOT 1
- Path parameter should work like file copy module HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-modules-core.