Commit Graph

127 Commits (c66491c07648bb1e8300c10e9c7cb073e49e4b95)

Author SHA1 Message Date
Toshio Kuratomi 2c378cc78a Fix for state=latest with wildcard or virtual provide package names 2016-12-08 11:23:40 -05:00
Brian Coca 2d7b1bd1c4 added comment explaining chdir defaults 2016-12-08 11:23:39 -05:00
Brian Coca d34f89a6fe default chdir to tmpdir to avoid virtualenv issues 2016-12-08 11:23:39 -05:00
Brian Coca 68e7945767 make chdir a path so it resolves shell aliases also removed this_dir logic as it is not needed, chdir is None by default and run_command can handle that. 2016-12-08 11:23:39 -05:00
Brian Coca d55ba3ab7c removed syslog in favor of common module logging functions 2016-12-08 11:23:38 -05:00
Greg DeKoenigsberg c2cc7f17a3 Change author field for os_redhat_subscription.py 2016-12-08 11:23:37 -05:00
Marius Gedminas 270c2e8bbd apt: check for "0 upgraded" to be at the beginning of the line
Fixes #1678.
2016-12-08 11:23:33 -05:00
Toshio Kuratomi 1102afed43 Fix for the case where plugins aren't loaded on old RHEL systems 2016-12-08 11:23:32 -05:00
Toshio Kuratomi 77457feda6 Return change results in a dictionary listing the package names.
Fix a parsing problem when package names contain a dot.
2016-12-08 11:23:32 -05:00
Brian Coca 9ad712018c deal with more failures when apt module fails to instantiate pkg fixes #1499 2016-12-08 11:23:32 -05:00
Jason DeTiberus 3619630972 python 2.4 syntax fix 2016-12-08 11:23:31 -05:00
Jason DeTiberus 8bc90c6a62 Add example for changing consumed subscriptions 2016-12-08 11:23:31 -05:00
Brian Coca c341df2231 updated docs for package 2016-12-08 11:23:30 -05:00
Brian Coca a8b24699be added gpg2 as fallback fixes #1796 2016-12-08 11:23:30 -05:00
queridiculo 92615669c0 yum: improved check_mode handling and package update flow. 2016-12-08 11:23:29 -05:00
Austin Brown 9ffde6c048 Adding version detection 2016-12-08 11:23:29 -05:00
Jason DeTiberus c2bc5a20fa bugfixes for redhat_subscription
- correctly return pool ids for newer versions of subscription-manager
- allow for managing subscriptions after initial registration.
2016-12-08 11:23:28 -05:00
Pierre-Louis Bonicoli fd88e8af53 fix error occurring with Debian
Error was: AttributeError: 'SourcesList' object has no attribute 'repos_urls'
2016-12-08 11:23:27 -05:00
Abhijit Menon-Sen 9b496818cf Simplify distribution test
If it's Ubuntu, use UbuntuSourcesList; if it's any other apt-friendly
distribution, use SourcesList; otherwise, fail.
2016-12-08 11:23:27 -05:00
Abhijit Menon-Sen ca50b5c5e0 Make SourcesList __init__ method also set self.module
This was originally required to allow other methods in SourcesList to
fail, but subsequent changes rendered that unnecessary, and it's just
a cleanup now, and avoids passing in module separately to save().
2016-12-08 11:23:27 -05:00
Abhijit Menon-Sen 46c015375d Clarify HAVE_PYTHON_APT/install_python_apt handling in apt_repository
1. Don't test check_mode in both the caller and in the callee.
2. Don't test HAVE_PYTHON_APT inside an if that tests HAVE_PYTHON_APT
3. Don't be irritatingly vague about why the module fails ("You may be
   seeing this because…").

Note that if «apt-get -y install python-apt» succeeds with rc==0, but
for some reason python_apt is not usable afterwards, this will break
because the imports in install_python_apt aren't wrapped inside a
try/except.

In other words, we assume that install_python_apt either succeeds or
fails with a traceback. This commit doesn't affect that behaviour.
2016-12-08 11:23:27 -05:00
Abhijit Menon-Sen 7643d3aecf Fix call to _expand_ppa 2016-12-08 11:23:27 -05:00
Yuhui Huang 621b396bd9 Checking pip uninstall output in both stdout and stderr 2016-12-08 11:23:24 -05:00
Brian Coca 723a48ca73 added versionadded to new option in pip module 2016-12-08 11:23:23 -05:00
Wouter Bolsterlee 3d7e3e3c3d Add a virtualenv_python argument to the pip module
This allows specifying the Python version to use when creating the
virtualenv. See issue #586.
2016-12-08 11:23:23 -05:00
Wouter Bolsterlee 5a0157a4f2 A few coding style cleanups 2016-12-08 11:23:22 -05:00
Wouter Bolsterlee e8a0b8b8ae Fix typo in `version_added` field. 2016-12-08 11:23:22 -05:00
Brian Coca 6980503357 updated to add missing 'use' option 2016-12-08 11:23:22 -05:00
Toshio Kuratomi 05be82183f Add notes about loop squashing and 1.9.2 change to install packages in one yum transaction 2016-12-08 11:23:19 -05:00
Brian Coca e7dc05df11 updated upgrade to a more sensible default as the previous was prone to confusion fixes #1667 2016-12-08 11:23:17 -05:00
Matt Martz a0f5ae8726 Replaced tabbed indentation with spaces for apt module 2016-12-08 11:23:16 -05:00
Toshio Kuratomi 432764b703 Add version that the profilename param was added 2016-12-08 11:23:16 -05:00
verm666 9b3aa0a9d4 This change is in response to issue #133.
The original problem is: apt_repository.py connect to launchpad on
every playbook run. In this patch apt_repository.py checks if required
repository already exists or not. If no - paa will be added, if yes -
just skip actions.
2016-12-08 11:23:14 -05:00
Toshio Kuratomi 9ecd06fb47 Fix apt_repository so that it does not modify the mode of existing repositories 2016-12-08 11:23:12 -05:00
Sebastian Gerhards a979417a4a rhn_register: add support for profilename 2016-12-08 11:23:12 -05:00
Jim Patterson 4185ffc43e Correct check mode for pip in virtualenv.
Fix #412.  Check mode was always returning changed=True for pip
when the target was in a virtualenv.  The code now uses the normal
tests for determining if change status.
2016-12-08 11:23:11 -05:00
Pierre-Louis Bonicoli c366e7acb2 apt_repository: fix file mode
'set_mode_if_different' method should be called on dest filename and after
'atomic_move' method
2016-12-08 11:23:11 -05:00
Toshio Kuratomi bd87c11c2a Read the url in in chunks so that we don't use as much memory for large packages 2016-12-08 11:23:11 -05:00
Toshio Kuratomi 2e7dcf3317 Small cleanups. * Import url(lib|parse|lib2) if needed by the module rather than relying on module_utils.urls to do so. * Remove stdlib modules from requirements * Use the if __name__ conditional for invoking main() 2016-12-08 11:23:11 -05:00
Toshio Kuratomi 88ae201b20 Fix bugs found by @kustodian 2016-12-08 11:23:09 -05:00
Toshio Kuratomi f0f1dc985f Fix incorrect line breaking 2016-12-08 11:23:09 -05:00
Toshio Kuratomi 9f043d9ba8 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.
2016-12-08 11:23:08 -05:00
Toshio Kuratomi ba566501a8 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.
2016-12-08 11:23:08 -05:00
az7arul 5ffb677b00 add `include_doc` option 2016-12-08 11:23:08 -05:00
Toshio Kuratomi ada424078b Restore setting cachedir when non-root but don't take a useless cachedir parameter to the function
* Revert "Remove unused code"
  This reverts commit bcfba0c05098696b6e770335870a9c22792fec38.
* Re-add the changes to remove cachedir as a parameter
2016-12-08 11:23:08 -05:00
Greg DeKoenigsberg eb881d7d5d Proper author info for all remaining modules 2016-12-08 11:23:07 -05:00
Edward Torbett 3a4d8f22a6 Renamed previous pkgs variable to installed_pkgs as spotted by @strahinja 2016-12-08 11:23:06 -05:00
Edward Torbett dad26d70fa Corrected pkg to pkgs as noted by @abadger 2016-12-08 11:23:06 -05:00
Edward Torbett 9707a5a95e Added multi package operation to remove as suggested by @abadger. Adding to latest is a little more complex due to '*' support. 2016-12-08 11:23:06 -05:00
Edward Torbett 32180c3c0e Comments by @abadger 2016-12-08 11:23:06 -05:00