Will Thames
a076309a0f
Check whether yum file or URL install is an upgrade ( #4547 )
...
Rather than just checking whether a package with the right
name is installed, use `local_nvra` to check whether the
version/release/arch differs too.
Remove `local_name` as it is a shortcut too far.
Fixes #3807
Fixes #4529
2016-09-19 21:13:23 -04:00
jctanner
d6a834efa0
Cleanup unused variable in yum.py ( #4009 )
2016-06-22 09:30:37 -04:00
jctanner
71d320ff18
Add local and url support to yum state=latest ( #4003 )
...
Fixes #3807
2016-06-21 20:59:17 -04:00
Michael Scherer
75715a1b73
Convert packaging/* to py3/py2.4 syntax ( #3702 )
2016-05-20 07:48:10 -07:00
Strahinja Kustudić
c8222bc8db
Yum module always downloads remote rpms. fixes #1452
2016-03-23 23:59:36 +01:00
toshihisa
530643a216
One more bug yum non English locales
...
d7fac82f97
2016-03-16 00:55:50 +09:00
Toshio Kuratomi
63fda10853
Merge pull request #1458 from Tahvok/patch-1
...
Explain that state=present should be used with yum and url
2016-02-04 06:57:07 -08:00
Toshio Kuratomi
d7fac82f97
Fix for yum's use of rpm with non English locales
...
Depends upon https://github.com/ansible/ansible/pull/14025
Fixes https://github.com/ansible/ansible/issues/13996
Fixes https://github.com/ansible/ansible/issues/13975
2016-01-20 12:09:32 -08:00
Chrrrles Paul
3c685d7468
Merge pull request #2680 from ansible/yum-use-rpm
...
Use rpm instead of repoquery for is_installed()
2015-12-15 00:13:43 -06:00
Toshio Kuratomi
0125770d8d
Use rpm instead of repoquery for is_installed()
...
* This keeps us from hitting bugs in repoquery/yum plugins in certain
instances (#2559 ).
* The previous is also a small performance boost
* Also in is_installed(), when using the yum API, return if we detect
a package name has been installed. We don't need to also check
virtual provides in that case. This is another small performance
boost.
* Sort the list of packages returned by the list parameter.
2015-12-13 09:16:28 -08:00
Brian Coca
74609ce42c
Merge pull request #2636 from vmindru/yum_fix_typo
...
fix typo s/defaults/default
2015-12-11 15:53:41 -05:00
Daniel Kimsey
a54d1fe09c
Fix yum module failing to initalize yum plugins
2015-12-09 12:06:48 -06:00
Veaceslav Mindru
0d5380258e
fix typo s/defaults/default
2015-12-06 20:54:05 +01:00
Veaceslav Mindru
dc697bf533
adding validate_certs for YUM. #2582
2015-11-29 20:59:03 +01:00
Charles Ferguson
490038b0e4
Update documentation of the 'pkg' and 'state' parameters in yum.
...
The yum module allows the 'name' parameter to be given as 'pkg', in
a similar way to some of the other package managers. This change
documents this alias.
The module's 'state' parameter has two other aliases, in line with
the 'apt' action; the 'state' parameter can take 'installed' as an
alias for 'present', and 'removed' as an alias for 'absent'. These
aliases are documented.
2015-11-23 23:42:40 +00:00
Toshio Kuratomi
eeaeeb5a1f
Correct typo in yum module docs
2015-10-27 12:51:48 -07:00
Toshio Kuratomi
06f301b05b
Note the difference between yum package groups and environment groups.
...
Fixes https://github.com/ansible/ansible/issues/12873
2015-10-26 08:37:03 -07:00
Toshio Kuratomi
01dcee98d2
Fix for state=latest with wildcard or virtual provide package names
2015-10-08 09:56:43 -07:00
Brian Coca
f6bbd2ac5b
removed syslog in favor of common module logging functions
2015-10-01 00:13:58 -04:00
Toshio Kuratomi
4721d6d8b5
Fix for the case where plugins aren't loaded on old RHEL systems
2015-08-20 15:34:57 -07:00
Toshio Kuratomi
c228739f2d
Merge pull request #1946 from ansible/pr/1657
...
Update check-mode results to be a dictionary (finishes pr 1657)
2015-08-20 13:14:02 -07:00
Toshio Kuratomi
9d4694122d
Return change results in a dictionary listing the package names.
...
Fix a parsing problem when package names contain a dot.
2015-08-20 13:02:29 -07:00
queridiculo
e5e0a70fc1
yum: improved check_mode handling and package update flow.
2015-07-22 18:07:57 -04:00
Toshio Kuratomi
d46c036b75
Add notes about loop squashing and 1.9.2 change to install packages in one yum transaction
2015-07-09 08:17:00 -07:00
Toshio Kuratomi
dba3bc7539
Read the url in in chunks so that we don't use as much memory for large packages
2015-06-24 08:12:49 -07:00
Toshio Kuratomi
0950593d53
Merge pull request #1516 from ansible/use-yum-api
...
Yum API is faster than calling out to repoquery.
2015-06-18 11:37:41 -07:00
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
2015-06-16 13:10:17 -07:00
Toshio Kuratomi
7c6c518003
Fix bugs found by @kustodian
2015-06-16 06:28:46 -07:00
Greg DeKoenigsberg
2a5f0bde87
Proper author info for all remaining modules
2015-06-15 15:53:30 -04:00
Toshio Kuratomi
08c17814fb
Fix incorrect line breaking
2015-06-15 10:46:59 -07:00
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.
2015-06-15 09:51:15 -07:00
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.
2015-06-13 17:08:32 -07:00
Edward Torbett
bcbf8c5556
Renamed previous pkgs variable to installed_pkgs as spotted by @strahinja
2015-06-12 18:06:25 +01:00
Edward Torbett
1fe79801f8
Corrected pkg to pkgs as noted by @abadger
2015-06-12 11:18:14 +01:00
Edward Torbett
fc36506b9e
Added multi package operation to remove as suggested by @abadger. Adding to latest is a little more complex due to '*' support.
2015-06-11 15:21:30 +01:00
Edward Torbett
471824b451
Comments by @abadger
2015-06-11 15:13:28 +01:00
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.
2015-06-11 12:39:42 +01:00
Albert Mikaelyan
fef463f17c
Update yum.py
2015-06-03 16:48:19 +03:00
Toshio Kuratomi
f3277f0f1f
Import ansible module_utils at bottom of file to not mess with line numbers in tracebacks
2015-05-29 13:37:47 -07:00
Jonathan Mainguy
7a5ad0c7f3
add :// url support for EL 5
2015-05-29 16:21:17 -04:00
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.
2015-05-20 19:46:39 +01:00
Toshio Kuratomi
1fa3efd7b4
Fix documentation
2015-05-05 13:58:41 -07:00
Jonathan Mainguy
3e66e409d5
Adds the exclude= option to the yum module. Works the same way --exclude does when yum install or yum update
2015-05-05 14:00:49 -04:00
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)
2015-04-21 10:07:11 -07:00
Brian Coca
da59efbc4b
Merge pull request #623 from mscherer/small_yum_cleanup
...
Remove unused option in yum's repoquery call
2015-04-13 17:04:51 -04:00
Brian Coca
5e970f79e3
Merge pull request #1012 from DavidWittman/yum-disable-enable-ordering
...
[yum] Set disabled repos before enabled repos
2015-04-13 16:42:11 -04:00
Brian Coca
788230c43e
ifxed error message as code remove the repo r var
2015-04-10 14:59:52 -04:00
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
.
2015-03-27 11:07:51 -05:00
Brian Coca
600fc15b42
Merge pull request #46 from Jmainguy/yum_oracle_fix_enable_repo
...
Fixes --enable-repo for Oracle Linux
2015-02-03 07:50:23 -05:00
Toshio Kuratomi
753a3ba382
Merge pull request #624 from mscherer/use_rpm_module
...
Use the rpm python module rather than execing rpm
2015-01-29 18:00:04 -08:00