Commit Graph

32 Commits (8cb4b7b01c7a45512105a9e0a30654219facf725)

Author SHA1 Message Date
Toshio Kuratomi dba3bc7539 Read the url in in chunks so that we don't use as much memory for large packages 9 years ago
Toshio Kuratomi 0950593d53 Merge pull request #1516 from ansible/use-yum-api
Yum API is faster than calling out to repoquery.
9 years ago
Toshio Kuratomi 86c30e68a1 Restore setting cachedir when non-root but don't take a useless cachedir parameter to the function
* Revert "Remove unused code"
  This reverts commit bcfba0c050.
* Re-add the changes to remove cachedir as a parameter
9 years ago
Toshio Kuratomi 7c6c518003 Fix bugs found by @kustodian 9 years ago
Greg DeKoenigsberg 2a5f0bde87 Proper author info for all remaining modules 9 years ago
Toshio Kuratomi 08c17814fb Fix incorrect line breaking 9 years ago
Toshio Kuratomi ef7a75938a Further optimizations pointed out by @kustodian in #1516
* Only install yum-utils if needed (b/c we're going to use repoquery)
* Add a warning message explaining that why slower repoquery was used
  rather than yum API.
9 years ago
Toshio Kuratomi 9c88f91092 Yum API is faster than calling out to repoquery. Looking through the
commit logs it looks like we weren't previously doing that because of
commit 14479e6adc

The message there is that Yum API prints an error message if the
rhn-plugin is in use and no rhn-certificate is available.  So instead of
using repoquery in preference always here we use repoquery in preference
if the rhn-plugin is enabled.
9 years ago
Edward Torbett bcbf8c5556 Renamed previous pkgs variable to installed_pkgs as spotted by @strahinja 9 years ago
Edward Torbett 1fe79801f8 Corrected pkg to pkgs as noted by @abadger 9 years ago
Edward Torbett fc36506b9e Added multi package operation to remove as suggested by @abadger. Adding to latest is a little more complex due to '*' support. 9 years ago
Edward Torbett 471824b451 Comments by @abadger 9 years ago
Edward Torbett 48422fba85 Rather than executing yum once per package, execute yum once for all supplied packages. This is necessary when performing a yum upgrade involving multiple dependent packages installed from RPM, for example when upgrading from PostgreSQL 9.0.11 to 9.0.21 on a Red Hat server. 9 years ago
Toshio Kuratomi f3277f0f1f Import ansible module_utils at bottom of file to not mess with line numbers in tracebacks 9 years ago
Jonathan Mainguy 7a5ad0c7f3 add :// url support for EL 5 9 years ago
Zoltan Kozma 364536a76e - Fixed annoying bug that disablerepo was essentially broken if a package needed updating by state latest.
- Replaced some unsafe practice with default parameters. However looking at the code this does not seem to matter much as the calling functions always seem to supply these parameters anyway.
9 years ago
Toshio Kuratomi 1fa3efd7b4 Fix documentation 10 years ago
Jonathan Mainguy 3e66e409d5 Adds the exclude= option to the yum module. Works the same way --exclude does when yum install or yum update 10 years ago
Toshio Kuratomi 3782ec0225 Allow yum module to take a yaml list of package names and also ", " separated string-list (in addition to comma separated string-list) 10 years ago
Brian Coca da59efbc4b Merge pull request #623 from mscherer/small_yum_cleanup
Remove unused option in yum's repoquery call
10 years ago
Brian Coca 5e970f79e3 Merge pull request #1012 from DavidWittman/yum-disable-enable-ordering
[yum] Set disabled repos before enabled repos
10 years ago
Brian Coca 788230c43e ifxed error message as code remove the repo r var 10 years ago
David Wittman 6d8437617c Set disabled repos before enabled repos
The ordering of disabling/enabling yum repositories matters, and
the yum module was mixing and matching the order. Specifically,
when yum-utils isn't installed, the codepath which uses the yum
python module was incorrectly ordering enabling and disabling.

The preferred order is to disable repositories and then enable them
to prevent clobbering. This was previously discussed in
ansible/ansible#5255 and incompletely addressed in 0cca4a3.
10 years ago
Brian Coca 600fc15b42 Merge pull request #46 from Jmainguy/yum_oracle_fix_enable_repo
Fixes --enable-repo for Oracle Linux
10 years ago
Toshio Kuratomi 753a3ba382 Merge pull request #624 from mscherer/use_rpm_module
Use the rpm python module rather than execing rpm
10 years ago
AlejandroF 7b40f63a4d Example added
How to define specific version of the package we need...
10 years ago
Michael Scherer bcfba0c050 Remove unused code
There is no call to yum_base using 'cachedir' argument, so
while it work fine from a cursory look, that's useless code,
and so should be removed to clarify the code.
10 years ago
Michael Scherer 0b2d190f72 Use the rpm python module rather than execing rpm
Using the rpm module prevent a uneeded fork, and permit
to skip the signature checking which slow down a bit the
operation, and which would be done by yum on installation
anyway.
10 years ago
Michael Scherer e025b591d3 Remove unused option in the repoquery call
Citing the man page:
       -q, --query
              For rpmquery compatibility, doesn't do anything.
10 years ago
René Moser 24137a3c6c yum: add update_cache option
Yum does not always update to latest package version unless metadata cache has expired. By runing yum makecache, we ensure the metadata cache has been updated.

Signed-off-by: René Moser <mail@renemoser.net>
10 years ago
Jonathan Mainguy ae1af202e8 Fixes --enable-repo for Oracle Linux 10 years ago
Michael DeHaan 3ed1378067 Some more module categorization. 10 years ago