-
Notifications
You must be signed in to change notification settings - Fork 23.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
package: version specifiers only work with yum
#29705
Comments
From @ansibot on 2016-08-19T14:14:21Z @ansible ping, this issue is waiting for your response. |
From @riccardomurri on 2016-08-19T14:14:21Z Currently I use the following workaround: early in the playbook I set a variable Then I call the package module like this::
(It's relatively straightforward, but may save someone a few minutes' time to |
Hi, I will try to work on the issue. I just cloned the repos. I think this is where the function is defined: |
I've seen exactly the same, here are some details for reproducibility: Failed: (using "-")
Success: (using "=")
I think an update to the documentation can help, although it would be better to change the module. I'll make a merge request for fixing the documentation. |
the |
closing as per above |
I would say this limits the utility of the |
We actually recommend not using |
From @riccardomurri on 2016-08-19T14:14:21Z
ISSUE TYPE
COMPONENT NAME
package
moduleANSIBLE VERSION
CONFIGURATION
No changes to the stock
ansible.cfg
, and no settings in the environment either:OS / ENVIRONMENT
Ubuntu 16.04 (xenial)
SUMMARY
Documentation for the OS-independent
package
module states thatname=
can be a "package specifier with version, like name-1.0". The
-
however is notconsidered a package/version separator by the
apt
module, which uses=
instead, and the
package
module does not translate it.In short, invocation of
package: name=foo-1.0 state=present use=apt
makesAnsible try to install package
foo-1.0
instead of ensuring that packagefoo
is installed at version
1.0
STEPS TO REPRODUCE
Package
lmod
is installed on my system and is version 5.8:However, if I try to check it with Ansible I get an error:
Using apt-compatible syntax works, but that defeats the purpose of an
OS-independent package manager:
EXPECTED RESULTS
That the package version specifiers are translated to the appropriate syntax for
the
apt
oryum
or whatever module Ansible'spackage
module is using underthe hood.
Copied from original issue: ansible/ansible-modules-core#4472
The text was updated successfully, but these errors were encountered: