-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
openbsd_pkg module should use -z to allow installing packages with alternatives #8990
Comments
Thank you for the report. I don't speak for the ansible team, but since I feel personally responsible for the module in question I wish to discuss a few things. I just installed a fresh -current i386 test machine to verify the -z behaviour. I noticed I was not able to install the package like the example above shows:
I would also expect that any package name installable via the module should be removable via the module. One problem here is that pkg_delete does not support a -z flag and does not seem to handle it naturally:
What are your ideas regarding this? Have the module try to find a best match based on what is installed? Lastly, I am not aware how much testing has been performed on the port, but I would not add such a flag lightly given that pkg_add already behaves differently with return values and such depending on if the package name contains a version number or not, and the module tries to handle this. I am not sure how -z changes the rules. At least in -current the return value changes its behaviour, meaning we probably need to change some assumptions the module currently makes as well:
|
For linking purposes, there is an associated PR: #8991 |
for example php-fpm-5.4* and ensure the correct version is installed. Previously, one had to specify the exact version, or ansible would fail since there were alternatives. ansible/ansible#8990 ok rpe@ Written by: Landry Breuil <landry@openbsd.org>
Yeah, the server i wrote & tested the patch on was running 5.5 - i have to admit i didnt had time to test -current. I think pkg_add -z behaviour changed.. As for pkg_delete, it doesnt need to support a -z flag for the php-fpm case since all alternatives conflict, but thatd be a problem for say python where multiple versions can coexist. |
Hi! Thanks very much for your interest in Ansible. It sincerely means a lot to us. On September 26, 2014, due to enormous levels of contribution to the project Ansible decided to reorganize module repos, making it easier We split modules from the main project off into two repos, http://github.com/ansible/ansible-modules-core and http://github.com/ansible/ansible-modules-extras If you would still like this ticket attended to, we will need your help in having it reopened in one of the two new repos, and instructions are provided below. We apologize that we are not able to make this transition happen seamlessly, though this is a one-time change and your help is greatly appreciated -- Both sets of modules will ship with Ansible, though they'll receive slightly different ticket handling. To locate where a module lives between 'core' and 'extras'
Additionally, should you need more help with this, you can ask questions on:
Thank you very much! |
for example php-fpm-5.4* and ensure the correct version is installed. Previously, one had to specify the exact version, or ansible would fail since there were alternatives. ansible/ansible#8990 ok rpe@ Written by: Landry Breuil <landry@openbsd.org>
for example php-fpm-5.4* and ensure the correct version is installed. Previously, one had to specify the exact version, or ansible would fail since there were alternatives. ansible/ansible#8990 ok rpe@ Written by: Landry Breuil <landry@openbsd.org>
for example php-fpm-5.4* and ensure the correct version is installed. Previously, one had to specify the exact version, or ansible would fail since there were alternatives. ansible/ansible#8990 ok rpe@ Written by: Landry Breuil <landry@openbsd.org>
for example php-fpm-5.4* and ensure the correct version is installed. Previously, one had to specify the exact version, or ansible would fail since there were alternatives. ansible/ansible#8990 ok rpe@ Written by: Landry Breuil <landry@openbsd.org>
for example php-fpm-5.4* and ensure the correct version is installed. Previously, one had to specify the exact version, or ansible would fail since there were alternatives. ansible/ansible#8990 ok rpe@ Written by: Landry Breuil <landry@openbsd.org>
Issue Type:
Bug Report/Feature Request
Ansible Version:
1.6.1, but same in master
Environment:
OpenBSD
Summary:
openbsd_pkg 's module doesnt allow to install a package when it has alternatives - ie for example php-fpm, which could be 5.3 or 5.4 - or python, where 2.6, 2.7 and 3.3 are available
Steps To Reproduce:
playbook snippet:
Expected Results:
php-fpm 5.4 should have installed
Actual Results:
pkg_add has this feature that if you use -z, it will try fuzzy-matching the package name/version, if you provided it enough details
Various usescases for -z ..
If openbsd_pkg would add -z in pkg_add invocation in https://github.com/ansible/ansible/blob/devel/library/packaging/openbsd_pkg#L127, then i would be able to install the correct version of the package within the alternatives, specifying php-fpm-5.4* in the name arg.
The text was updated successfully, but these errors were encountered: