Commit Graph

224 Commits (43760b2c4a346d9d4bf1a8d5cf2fec3b974c2864)

Author SHA1 Message Date
Chris Weber 9f58e7325c Fixed exception compatablity for py3 (and 2.4 in yum_repository.py) (#2369)
* Fixed exception compatablity for py3 (and 2.4 in yum_repository.py)

* Moved Import
9 years ago
Jiri Tyr 7549976dc0 Fixing wrong type of params option in yum_repository module (#2371)
This commit fixes incorrect type of the "params" option of the
"yum_repository" module. Without this fix the value of the "params"
option is read as a string instead of as a dictionary which makes
it impossible to define any additional YUM repository parameters.
9 years ago
Dmitry Marakasov b0aec50b9a Improve documentation for pkgng module (#2338)
According to module checklist:

- Descriptions should always start with a Capital letter and end with a
  full stop.
- Ensure that you make use of U() for urls, C() for files and options,
  I() for params, M() for modules.
9 years ago
Brian Coca 8fac01a3cc minor fixes
removed unused imports
rearranged basic import
added if/main for testing/importability
9 years ago
Dmitry Marakasov e316888f21 Freebsd pkgng autoremove support (#2324)
* Whitespace cleanup

* Add autoremove capability to pkgng

* Add "default" and "choices" documentnation items for autoremove
9 years ago
Adrian Likins d1a4f703ce Fix pkgutil "upgrade_catalog must be one of" err (#2149)
The arg spec for update_catalog include 'type=bool'
and 'choices=["yes", "no"] which can never both be
true.

Remove the 'choices' directive, and update doc string.

Fixes #2144
9 years ago
Alex ce5a9b6c5f zypper: (Bugfix) Change command option --verbose to --details which is supported since 2008 (#2224) 9 years ago
Rene Moser 806ebef383 homebrew_cask: fix doc version_added for install_options
See #2086
9 years ago
Robin Roth bb68df525c refactor zypper module
* refactor zypper module

Cleanup:
* remove mention of old_zypper (no longer supported)
  * requirement goes up to zypper 1.0, SLES 11.0, openSUSE 11.1
  * allows to use newer features (xml output)
  * already done for zypper_repository
* use zypper instead of rpm to get old version information, based on work by @jasonmader
* don't use rpm, zypper can do everything itself
* run zypper only twice, first to determine current state, then to apply changes

New features:
* determine change by parsing zypper xmlout
* determine failure by checking return code
* allow simulataneous installation/removal of packages (using '-' and '+' prefix)
  * allows to swap out alternatives without removing packages depending
    on them
* implement checkmode, using zypper --dry-run
* implement diffmode
* implement 'name=* state=latest' and 'name=* state=latest type=patch'
* add force parameter, handed to zypper to allow downgrade or change of vendor/architecture

Fixes/Replaces:
* fixes #1627, give changed=False on installed patches
* fixes #2094, handling URLs for packages
* fixes #1461, fixes #546, allow state=latest name='*'
* fixes #299, changed=False on second install, actually this was fixed earlier, but it is explicitly tested now
* fixes #1824, add type=application
* fixes #1256, install rpm from path, this is done by passing URLs and paths directly to zypper

* fix typo in package_update_all

* minor fixes

* remove commented code block
* bump version added to 2.2
* deal with zypper return codes 103 and 106
9 years ago
Indrajit Raychaudhuri 142742964e Fix homebrew_cask examples 9 years ago
Indrajit Raychaudhuri c5ed63a972 Add `version_added` doc property for `install_options` in homebrew_cask 9 years ago
Indrajit Raychaudhuri 8128464adc Add additional examples for parameter `install_options` in homebrew_cask 9 years ago
Enric Lluelles 357cbd73f5 Adding install_options to homebrew_cask 9 years ago
Robin Roth e8fdba7593 Zypper repository rewrite (#1990)
* Remove support for ancient zypper versions

Even SLES11 has zypper 1.x.

* zypper_repository: don't silently ignore repo changes

So far when a repo URL changes this got silently ignored (leading to
incorrect package installations) due to this code:

    elif 'already exists. Please use another alias' in stderr:
        changed = False

Removing this reveals that we correctly detect that a repo definition
has changes (via repo_subset) but don't indicate this as change but as a
nonexistent repo. This makes us currenlty bail out silently in the above
statement.

To fix this distinguish between non existent and modified repos and
remove the repo first in case of modifications (since there is no force
option in zypper to overwrite it and 'zypper mr' uses different
arguments).

To do this we have to identify a repo by name, alias or url.

* Don't fail on empty values

This unbreaks deleting repositories

* refactor zypper_repository module

* add properties enabled and priority
* allow changing of one property and correctly report changed
* allow overwrite of multiple repositories by alias and URL
* cleanup of unused code and more structuring

* respect enabled option

* make zypper_repository conform to python2.4

* allow repo deletion only by alias

* check for non-existant url field and use alias instead

* remove empty notes and aliases

* add version_added for priority and overwrite_multiple

* add version requirement on zypper and distribution

* zypper 1.0 is enough and exists

* make suse versions note, not requirement

based on comment by @alxgu
9 years ago
Jiri Tyr 3ba9e817fe Describing the _none_ value of the proxy option (#2053) 9 years ago
Michael Scherer e8dbb4e4f2 Mark conf_file as a path, for various user expansion 9 years ago
Christopher M. Fuhrman 8c6a3e732e pkgin: Fix bad regexp which did not catch packages such as p5-SVN-Notify
The previous version of my regexp did not take into account packages
such as 'p5-Perl-Tidy' or 'p5-Test-Output', so use a greedy match up to
the last occurrance of '-' for matching the package.  This regex has
been extensively tested using all packages as provided by pkgsrc-2016Q1[1].

Footnotes:
[1]  http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/?only_with_tag=pkgsrc-2016Q1
9 years ago
Jasper Lievisse Adriaanse 2b8debbc2b Sprinkle some LANG/LC_* where command output is parsed (#2019) 9 years ago
Jasper Lievisse Adriaanse 85c1440ede Tweak and extend the pkgin module
- make path to pkgin a global and stop passing it around; it's not going
  to change while ansible is running
- add support for several new options:
  * upgrade
  * full_upgrade
  * force
  * clean
- allow for update_cache to be run in the same task as upgrading/installing
  packages instead of needing a separate task for that
9 years ago
Joerg Fiedler 44bfca315a add chroot flag to pkgng in order to allow installation of packages into chroot environments, e.g. jails (#1218) 9 years ago
René Moser 542a96f907 Merge pull request #1827 from jasperla/pkgin_update_cache
support for 'update_cache' in pkgin module
9 years ago
Michael Scherer d9b8043b4a Use type='path' for reposdir, since that's a path 9 years ago
Jasper Lievisse Adriaanse 3e31c2408d support for 'update_cache' in pkgin module 9 years ago
Brian Coca 7ef09ac889 Merge pull request #1919 from mscherer/fix_portage
Use boolean instead of "yes" + choice for most option
9 years ago
Michael Scherer 9853caa536 Use boolean instead of "yes" + choice for most option
This enable a more standard behavior with others modules
9 years ago
Michael Scherer 2e8cd5cd74 Use type 'path' for rootdir, for pkgng 9 years ago
Brian Coca 3b95400a59 change name to be a list type
remove implicit split that expects a , separated string, let list type
deal with multiple possible compatible input types.
also removed unused imports
9 years ago
Matthew Gamble a92a0e56f2 Remove dead code from pacman module
The manual check to see if get_bin_path() returned anything is
redundant, because we pass True to the required parameter of
get_bin_path(). This automatically causes the task to fail if the pacman
binary isn't available. Therefore, the code within the if statement
being removed is never called.
9 years ago
René Moser af9aaed64c Merge pull request #1662 from saez0pub/devel
Prevent reinstallation in case of group package
9 years ago
Will Keeling 282deb3291 Better handling of package groups in pacman module 9 years ago
saez0pub 6c7be7d97d Prevent reinstallation in case of group package 9 years ago
Toshio Kuratomi 9835b6a477 Fail due to no dnf module installed earlier as we use a dnf utility function to determine if we have permission to install packages. 9 years ago
Jiri Tyr 012085263f Removing parameter from yum_repository module 9 years ago
Toshio Kuratomi 95d54004af Merge pull request #1772 from jtyr/jtyr-yumrepo_new_params
Adding more options to the yum_repository module
9 years ago
Brian Coca f23baa2dda Merge pull request #1646 from k0ste/newfeature
pacman: fix recurse delete. Add force update_cache feature.
9 years ago
Jiri Tyr 23c4e8de4a Adding more options to the yum_repository module 9 years ago
Rene Moser 7c38f8ff75 doc: replace yumrepo with yum_repository 9 years ago
Rene Moser c5fa64998c rename yumrepo to yum_repository 9 years ago
Jan Chaloupka d011149baf dnf module: package not installed with state=latest
dnf: name=PACKAGE state=latest is reponsible for two use cases:
- to install a package if not already installed.
- to update the package to the latest if already installed.

The latter use cases is not handled properly as base.upgrade does not
throw dnf.exceptions.MarkingError if a package is not installed.

Setting base.conf.best = True ensures a package is installed or
updated to the latest when calling base.install.

Sign-off: jsilhan@redhat.com
Sign-off: jchaloup@redhat.com
9 years ago
Konstantin Shalygin 808177e2c9 Fix recurse delete. Add force update_cache feature. 9 years ago
Toshio Kuratomi 14a62fb5d6 Merge pull request #1415 from jtyr/jtyr-yumrepo_params
Adding params option into the yumrepo module
9 years ago
Toshio Kuratomi b1e9dc0b52 Allow dnf to remove dependent packages of a package that is being removed
Fixes #1517
9 years ago
Jiri Tyr 7f918b375f Adding params option into the yumrepo module 9 years ago
Daniel Jakots d24721f651 fix the spelling of vim's flavor in the example 9 years ago
Toshio Kuratomi 36be779888 Remove duplicate documentation fields 9 years ago
Brian Coca ad2208c7b5 Merge pull request #1201 from bonds/devel
add ports support to openbsd_pkg
9 years ago
Scott Bonds 2b69a2b14c add python 2.5 requirement and ansible 2.1 version_added 9 years ago
Scott Bonds 5b555b9347 add ports support in openbsd_pkg 9 years ago
Brian Coca 3aa2d3744d Merge pull request #1482 from ansible/json-imports-fallback
Update for modules which import json.
9 years ago
Brian Coca 264a7c88f6 added missing version_added 9 years ago