Commit Graph

285 Commits (8702ead0a7c99e2f6534ea780e4fa8684b9be7fe)

Author SHA1 Message Date
Christopher M. Fuhrman 310b7ce3d8 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
2016-12-08 11:34:06 -05:00
Jasper Lievisse Adriaanse 0fb01e45fb Sprinkle some LANG/LC_* where command output is parsed (#2019) 2016-12-08 11:34:05 -05:00
Jasper Lievisse Adriaanse 8913f1a11d 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
2016-12-08 11:34:05 -05:00
stoned 6a77e62df4 cpanm: search both its stderr and its stdout for the message 'is up t…
Note that since cpanm version 1.6926 its messages are sent to stdout
when previously they were sent to stderr.

Also there is no need to initialize out_cpanm and err_cpanm and
check for their truthiness as module.run_command() and str.find()
take care of that.
2016-12-08 11:34:04 -05:00
Joerg Fiedler 518b03d73f add chroot flag to pkgng in order to allow installation of packages into chroot environments, e.g. jails (#1218) 2016-12-08 11:34:04 -05:00
Him You Ten 87ce503767 added stdout and stderr outputs (#1900)
* added stdout and stderr outputs

Added stdout and stderr outputs of the results from composer as the current msg output strips \n so very hard to read when debugging

* using stdout for fail_json

using stdout for fail_json so we get the stdout_lines array
2016-12-08 11:34:04 -05:00
Jasper Lievisse Adriaanse 3a319b9a84 support for 'update_cache' in pkgin module 2016-12-08 11:34:04 -05:00
Michael Scherer f47a756c46 Add proper type to cpanm arguments
from_path, locallib, executable should be path to benefits
from path expansion for ~user.
2016-12-08 11:34:03 -05:00
Michael Scherer a21ab5b990 Use type='path' for reposdir, since that's a path 2016-12-08 11:34:01 -05:00
Michael Scherer dc94ce72c7 Use boolean instead of "yes" + choice for most option
This enable a more standard behavior with others modules
2016-12-08 11:34:01 -05:00
Michael Scherer 2a0c9bb3a2 Use type 'path' for rootdir, for pkgng 2016-12-08 11:34:01 -05:00
Brian Coca 0ebabc50e4 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
2016-12-08 11:34:00 -05:00
Matthew Gamble b58eaca7e8 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.
2016-12-08 11:33:59 -05:00
Michael Scherer eefd716e8c Add better type checking for elasticsearch_plugin 2016-12-08 11:33:59 -05:00
Michael Scherer 4c63a958e5 Use no_log for the password for maven_artifact module 2016-12-08 11:33:59 -05:00
Michael Scherer 9f90c2355f Add the proper type for the various path argument 2016-12-08 11:33:59 -05:00
Nate Smith b820017ed0 Allow numeric npm package versions
When passing a package version that parses as a number (e.g. `1.9`), the version should be converted to a string before being concatenated to the package name.
2016-12-08 11:33:57 -05:00
saez0pub 029b608e1e Prevent reinstallation in case of group package 2016-12-08 11:33:56 -05:00
Will Keeling 876fe06290 Better handling of package groups in pacman module 2016-12-08 11:33:53 -05:00
Toshio Kuratomi c602d49d42 Fail due to no dnf module installed earlier as we use a dnf utility function to determine if we have permission to install packages. 2016-12-08 11:33:53 -05:00
Jiri Tyr bb194b03bc Removing parameter from yum_repository module 2016-12-08 11:33:53 -05:00
Jiri Tyr 709ae10207 Adding more options to the yum_repository module 2016-12-08 11:33:53 -05:00
Konstantin Shalygin 3956549e6c Fix recurse delete. Add force update_cache feature. 2016-12-08 11:33:52 -05:00
Thierno IB. BARRY 0f175cec07 Add ES 2.x support
Add compatibility between ES 1.x and ES 2.x.

bin/plugin install | remove [plugin_name] works on ES 1.x and ES 2.x
2016-12-08 11:33:51 -05:00
Rene Moser e9667eb542 doc: replace yumrepo with yum_repository 2016-12-08 11:33:51 -05:00
Rene Moser 84259eb2d6 rename yumrepo to yum_repository 2016-12-08 11:33:51 -05:00
Matt Martz 1f7a2041be Indicate proxy_host and proxy_port were added in 2.1 2016-12-08 11:33:49 -05:00
Jan Chaloupka 6e201948bc 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
2016-12-08 11:33:49 -05:00
Thierno IB. BARRY 4c07e1447e update doc for proxy support
Update documentation to add proxy section
2016-12-08 11:33:49 -05:00
Thierno IB. BARRY 32d4a8811c Elasticsearch: Add proxy support
Add proxy support for plugin installation.
2016-12-08 11:33:49 -05:00
Jiri Tyr 014d78e78d Adding params option into the yumrepo module 2016-12-08 11:33:48 -05:00
Toshio Kuratomi 96f1bd82c0 Allow dnf to remove dependent packages of a package that is being removed
Fixes #1517
2016-12-08 11:33:48 -05:00
Daniel Jakots ffc291bc9a fix the spelling of vim's flavor in the example 2016-12-08 11:33:46 -05:00
Toshio Kuratomi 255c4b01a8 Remove duplicate documentation fields 2016-12-08 11:33:46 -05:00
Scott Bonds 7f1ccad39b add python 2.5 requirement and ansible 2.1 version_added 2016-12-08 11:33:45 -05:00
Scott Bonds 056a532d75 add ports support in openbsd_pkg 2016-12-08 11:33:45 -05:00
lipanski 9d355fb5af Fix: Rename gem_install_path to gem_path - as specified in the docs 2016-12-08 11:33:45 -05:00
Toshio Kuratomi ad0d2c1747 Update for modules which import json.
Some do not use the json module directly so don't need import json.
Some needed to fallback to simplejson with no traceback if neither was installed

Fixes #1298
2016-12-08 11:33:44 -05:00
Alexander Winkler dca9d618f0 fixed inline for more compatibility 2016-12-08 11:33:43 -05:00
Alexander Winkler c730bd6f1c Added update_catalog and some error handling 2016-12-08 11:33:43 -05:00
Yoshinori Teraoka 47b09873e2 add executable parameter to cpanm module
like other packaging modules (pip, gem)
2016-12-08 11:33:43 -05:00
Javier Palacios 9dcea19175 Allow relative path for bower executable
Add default value

Rename argument

Explicit verification of relative bower path

Add example

Old keyword name used in example

BUGFIX: tilde expansion actually useless on relative paths

Modify relative_execpath default value as suggested

Added version_added for relative_execpath

Update for last few comments on the bug report

* version to 2.1 since this feature enhancement will now go into 2.1
* set path and relative_execpath type to path
* Set default value of path to None
2016-12-08 11:33:43 -05:00
Charles Paul 3cd6e4c1f8 make dest use path type
path type
2016-12-08 11:33:42 -05:00
Michael Scherer d504253257 Simplify the code and remove use_unsafe_shell=True
While there is no security issue with this shell snippet, it
is better to not rely on shell and avoid use_unsafe_shell.
2016-12-08 11:33:41 -05:00
Matt Martz 22733a7574 Fix tabbed indentation in packaging/os/pkgutil.py 2016-12-08 11:33:40 -05:00
Michael Scherer df195b3076 Replace choices=BOOLEANS by type='bool', fix #1326 2016-12-08 11:33:40 -05:00
Marc Mettke 43d2e3ad68 Pacman Module Fixes
Update: query_package documentation
Fix: Number of Packages to Updated was one to high,
     'cause of counting the '\n'
Fix: Pacman was reinstalling state=latest packages,
     even when it was unable to load the remote version
2016-12-08 11:33:40 -05:00
Kirill Kozlov 6f663fa7bf Set latest as version argument default value 2016-12-08 11:33:38 -05:00
Brian Coca a9abec5a03 updated version version_added to 2.1 2016-12-08 11:33:38 -05:00
Dylan Martin 766b53b066 added version option 2016-12-08 11:33:38 -05:00
Michal Svab 5f743c4fdc maven_artifact: check whether snapshot is the latest snapshot 2016-12-08 11:33:38 -05:00
Guido Günther 13deae9b8f zypper: Add returncode to result
This will be used in integration tssts and makes the whole thing
more similar to the yum module.
2016-12-08 11:33:37 -05:00
Jiri tyr d4d24bac60 Adding yumrepo module
This patch is adding a new module which allows to add and remove YUM
repository definitions. The module implements all repository options
as described in the `yum.conf` manual page.
2016-12-08 11:33:36 -05:00
Indrajit Raychaudhuri 92efb6eb51 homebrew: Aditional examples for documentation 2016-12-08 11:33:34 -05:00
Indrajit Raychaudhuri 273d1c51e6 homebrew: Add explicit documentation for 'path' argument (with expected default)
In Homebew, a formula is installed in a location relative to the actual
`brew` command. The documentation clarifies that.

Additionally, removed redundant 'path' reconstruction in multiple places.
2016-12-08 11:33:34 -05:00
Robin Roth 85f2165273 better cope with rpm not returning package name
if the rpm query is missing a package name (or giving some error): fail soft

before the patch: the module fails because the installed_state dict is missing the package name

after the patch: the missing package is assumed to not be in the correct state and is installed/removed with zypper
2016-12-08 11:33:33 -05:00
xiaclo b36b12e968 Allow NPM to update packages 2016-12-08 11:33:33 -05:00
pmakowski 9ab42a98ca no-suggests is obsolete, switch to no-recommends 2016-12-08 11:33:33 -05:00
Kirill Kozlov 426613b00d Fix broken examples in docs 2016-12-08 11:33:32 -05:00
Ramunas Dronga 86bea2d6ab fixed composer usage example 2016-12-08 11:33:31 -05:00
Ramunas Dronga ae18a1d877 added constraint for space in composer command 2016-12-08 11:33:31 -05:00
Ramunas 662fa86f07 removed check for empty composer response 2016-12-08 11:33:31 -05:00
Ramunas Dronga 6e4b42ebbc added version info for params 'arguments' 2016-12-08 11:33:31 -05:00
Ramunas Dronga ae59ea7deb allow specify arguments for composer 2016-12-08 11:33:31 -05:00
Toshio Kuratomi 8c8c63110e Move existing check for root before we make expensive network calls 2016-12-08 11:33:31 -05:00
Brian Coca b7372b509a corrected extension in module spec fixes #1190 2016-12-08 11:33:31 -05:00
Toshio Kuratomi 9c75b5eac3 Make the pkg/name param into a list so that changes to make changes to _squash_items easier 2016-12-08 11:33:31 -05:00
Brian Coca d9a29f394f fixed missed passing use-sudo 2016-12-08 11:33:30 -05:00
james c2a4e230aa More consistent use of run_command() wrapper function, which now adds the default binary location to the search path 2016-12-08 11:33:30 -05:00
M0ses a1dbb83075 fix errorhandling in zypper.py module
package_latest was calling package_present but did not care
about the return code so errors in package_present were hidden
and everthing look ok on the console when zypper update did not fail,
but no packages where installed.
2016-12-08 11:33:29 -05:00
Christopher M. Fuhrman 5574516934 pkgin: Support multiple matching packages
pkgin searches for packages such as 'emacs' can return multiple matches,
the first of which is not guaranteed to match.  So, iterate through
found packages until we have an appropriate match.  Should we *not* find
a match, then return False indicating match failure.
2016-12-08 11:33:29 -05:00
Kevin b43329b6a0 Remove `homebrew-` prefix when checking if repo has already been tapped
See: https://github.com/Homebrew/homebrew/blob/master/Library/Homebrew/cmd/tap.rb

Example:

```
$ brew tap neovim/homebrew-neovim
$ brew tap
neovim/neovim
...
```
2016-12-08 11:33:26 -05:00
Brian Coca 1426c3ba02 added missing GPL licences fixes #508 2016-12-08 11:33:26 -05:00
Toby Fleming 3293fe7231 Homebrew: Allow colons, direct check for outdated formula 2016-12-08 11:33:26 -05:00
Indrajit Raychaudhuri e115f62a2d homebrew: Also add 'formula' as alias for 'name' and reformat 2016-12-08 11:33:25 -05:00
Indrajit Raychaudhuri c397dfe9ed homebrew: Improve 'argument_spec' handling
- Remove choice list for boolean values in argument_spec and make it
  more consistent with core modules
- Add 'package' alias and support for list type for 'name' parameter
- Added self as maintainer
2016-12-08 11:33:25 -05:00
Toshio Kuratomi 7ccd6a4de0 Change documented requirement from dnf to python-dnf as dnf could be taken to mean the command line tool.
Fixes #1032
2016-12-08 11:33:25 -05:00
Brian Coca ae84177514 switched to use module loggigng 2016-12-08 11:33:24 -05:00
Brian Coca a04972c79b changed use_sudo to system_lib (kept alias) and expanded description to explain how it works 2016-12-08 11:33:24 -05:00
Milad Soufastai c3c9f46ba4 Updating Description to provide better explanation of what the use_sudo flag does 2016-12-08 11:33:24 -05:00
Milad Soufastai 07a4ab2fc5 Adding the --sudo flag for CPANM use since the sudo: yes on the task doesn't work 2016-12-08 11:33:24 -05:00
ToBeReplaced faee617b21 Fix fail_json call in _mark_package_install 2016-12-08 11:33:23 -05:00
Rene Moser 859b2f7948 composer: smarter arguments handling
To get all available options in json for each command, `composer help <command> --format=json` can be used. This allows us to simply parse the output and dynamically find out if an option is available. Neat!
2016-12-08 11:33:23 -05:00
Rene Moser b9960c0172 composer: rename composer_install to composer_command 2016-12-08 11:33:23 -05:00
Rene Moser 61fcbe0d51 composer: simplify has_changed() 2016-12-08 11:33:23 -05:00
Indrajit Raychaudhuri 42a28d92e2 Additional upgrade mode fixes for pacman module with check_mode safety - ensure upgrade option honors and actually supports `check_mode` - enabling just `upgrade` and `update_cache` should perform upgrade - example added for the equivalent for `pacman -Syu` 2016-12-08 11:33:22 -05:00
Indrajit Raychaudhuri f10de6e47b Add 'package' alias and support for list type for pacman 'name' parameter 2016-12-08 11:33:21 -05:00
Vlad Glagolev fa56777341 fixed a typo in swdepot module 2016-12-08 11:33:20 -05:00
Gerard Lynch d17fa53764 fix param description rst syntax 2016-12-08 11:33:19 -05:00
timeraider4u a7e088c683 added check_mode support
added support for the --check option during execution of the playbooks
2016-12-08 11:33:19 -05:00
Vlad Glagolev c3d49d7db0 fixed a typo in pacman module 2016-12-08 11:33:19 -05:00
ToBeReplaced ad54ce6125 Rewrite dnf module.
This fully implements all expected functionality of the dnf module.

Group removal may behave oddly due to hiccups in tagging groups as being
installed.

A pkg_types option could be added to specify the group package types.
2016-12-08 11:33:19 -05:00
ToBeReplaced cdf603448a Add support for state=latest and * 2016-12-08 11:33:19 -05:00
ToBeReplaced 337a1db62e Add change reporting, enablerepo support, and gpgcheck.
disable_gpg_check was configured backwards, so it was toggled. Typos in
enablerepo/disablerepo are removed. fill_sack() calls are relocated to
occur after repo decisions. The "changed" key is now set for new
installations.
2016-12-08 11:33:19 -05:00
Igor Gnatenko e178abb501 typo fix in oneliners
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-12-08 11:33:19 -05:00
Toshio Kuratomi a1235d91a2 Fix nevra, fixes to docs and copyright info 2016-12-08 11:33:19 -05:00
Igor Gnatenko e8f3059300 add ability to install packages
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-12-08 11:33:19 -05:00
Igor Gnatenko 7a6af06f8b remove all and start from scratch
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-12-08 11:33:19 -05:00
Indrajit Raychaudhuri 739ff5c807 pacman: Remove choice list for boolean values in arg spec This also makes argument_spec more consistent with core modules.
Added self as author.
2016-12-08 11:33:18 -05:00
Brian Coca 5185dd3563 added version added 2016-12-08 11:33:17 -05:00