Commit Graph

288 Commits (2858d24acb1f593dd3849ade68fc29c48fec8cee)

Author SHA1 Message Date
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
Brian Coca bf7851d9ad added version_added to new feature 2016-12-08 11:33:17 -05:00
Carl Meyer 66777d010b Add 'production' option to bower module. 2016-12-08 11:33:17 -05:00
Kristian Koehntopp 2d9d474f23 update inline documentation 2016-12-08 11:33:13 -05:00
Kristian Koehntopp 2e80ff1898 add force= option to allow force installation/removal of packages 2016-12-08 11:33:13 -05:00
Andreas Skarmutsos Lindh d2bcd4e8e7 quoted version_added 2016-12-08 11:33:12 -05:00
Andreas Skarmutsos Lindh 0e55b498ad add version_added 2016-12-08 11:33:12 -05:00
Andreas Skarmutsos Lindh 4b0dc387ce cpanm: add installdeps option 2016-12-08 11:33:12 -05:00
sirkubax 83b03752c5 QuickFix of issue 813 2016-12-08 11:33:11 -05:00
Mehmet Ali \"Mali\" Akmanalp 4a6c9dd5b3 Fixes issues where keys missing from bower output
Fixes #495
2016-12-08 11:33:09 -05:00
Brian Coca f9a42f60c5 minor doc uptates 2016-12-08 11:33:07 -05:00
Kim Nørgaard 8a826d61e9 fixed a few issues pointed out by @resmo, pyflakes, pep8 2016-12-08 11:33:07 -05:00
Kim Nørgaard 7cc2cd7881 Add basic slackpkg support 2016-12-08 11:33:06 -05:00
Brian Coca adf7132586 updated version_added 2016-12-08 11:33:06 -05:00
Kevin Brebanov 4d184a3d5b Use the module's get_bin_path function to find 'apk' and reuse the return value in all functions 2016-12-08 11:33:06 -05:00
Kevin Brebanov 4d50f557bd Modify 'name' argument to be of type 'list' in order to support 'with_items' looping 2016-12-08 11:33:06 -05:00
Kevin Brebanov 90a644c18d Update documentation 2016-12-08 11:33:06 -05:00
Kevin Brebanov 95dc4ec5ec Allow multiple packages to be installed at the same time 2016-12-08 11:33:06 -05:00
Kevin Brebanov a5d604e151 Allow multiple packages to removed at the same time 2016-12-08 11:33:06 -05:00
Kevin Brebanov 69389f0cdc Adding apk module 2016-12-08 11:33:06 -05:00
Alexander Gubin 3ccc50fcd5 zypper: Add local/remote rpm installation
Add remote rpm example
2016-12-08 11:33:06 -05:00
Thomas Bechtold 00a5c352ec zypper_repository: Fix repo parsing for empty list
When no repositories are defined in zypper, the return code
of "zypper repos" is 6. Handle that case and don't fail
if zypper_repository has to deal with an empty repo list.

Fixes https://github.com/ansible/ansible-modules-extras/issues/795
2016-12-08 11:33:06 -05:00
Toshio Kuratomi 4a179b9a6e Port layman to fetch_url 2016-12-08 11:33:05 -05:00
Michael Scherer d031cd2998 Move examples to EXAMPLES variable
Partially fix #507
2016-12-08 11:33:03 -05:00
Charlie Root e852df1c0a Add rootdir option to pkgng 2016-12-08 11:33:03 -05:00
Indrajit Raychaudhuri fb268d58d9 Improve pacman module
- detect and use pacman_path via get_bin_path helper
- simplify pending upgrade detection
- apply outstanding changes from #358, #41
2016-12-08 11:33:03 -05:00
Konstantin Shalygin 873c478853 add 'version_add' 2016-12-08 11:33:03 -05:00
Konstantin Shalygin bf7498bc64 add force remove feature 2016-12-08 11:33:03 -05:00
Konstantin Shalygin 1776118aea add upgrade future, patch by n0vember- 2016-12-08 11:33:03 -05:00
Toshio Kuratomi de2f9ed5ff Port maven_artifact to fetch_url 2016-12-08 11:33:02 -05:00
Mathew Davies 40f77fd07c Add more examples 2016-12-08 11:33:00 -05:00
Mathew Davies 36c5ac65f7 Note that the plugin can't be updated once installed 2016-12-08 11:33:00 -05:00
Mathew Davies 752a24caa7 Move ansible util import to the bottom of the module 2016-12-08 11:33:00 -05:00
Mathew Davies 9b6ca2b248 Add default documentation for timeout 2016-12-08 11:33:00 -05:00
Mathew Davies d2d3510d03 Add required property to version documentation 2016-12-08 11:33:00 -05:00
Mathew Davies b4fb90439f Remove debugging line 2016-12-08 11:33:00 -05:00
Mathew Davies 0d6cd1d8ab Document defaults 2016-12-08 11:33:00 -05:00
Mathew Davies 8dc99baabf Add Elasticsearch plugin module 2016-12-08 11:33:00 -05:00
Toshio Kuratomi 16cb0e979d Tabs to spaces
Fixes #666
2016-12-08 11:33:00 -05:00
Toshio Kuratomi a43a93315f Add author github ID 2016-12-08 11:32:56 -05:00
Matt Martz 17b1edfa1c Give dpkg_selections a .py file extension 2016-12-08 11:32:56 -05:00
Toshio Kuratomi a206f3d89f Fix bundler documentation 2016-12-08 11:32:56 -05:00
Tim Hoiberg 9b03eccbc1 Fixing typo 2016-12-08 11:32:55 -05:00
Tim Hoiberg 0ee7db13d9 Adding module to manage Ruby Gem dependencies via Bundler 2016-12-08 11:32:55 -05:00
Patrik Lundin e5b975a472 openbsd_pkg: Update author mail address. 2016-12-08 11:32:55 -05:00
Andrew Udvare acd4822d52 Fix comparison 2016-12-08 11:32:53 -05:00
Andrew Udvare c21ced350d --usepkgonly does not imply --getbinpkg
Add usepkg option to allow conditional building from source if binary
packages are not found

5a6de937cb (commitcomment-11755140)
https://wiki.gentoo.org/wiki/Binary_package_guide#Using_binary_packages
2016-12-08 11:32:53 -05:00
Dustin C. Hatch 90df50b045 packaging/os/portage: Handle noreplace in check mode
The `--noreplace` argument to `emerge` is generally coupled with
`--newuse` or `--changed-use`, and can be used instruct Portage to
rebuild a package only if necessary. Simply checking to see if the
package is already installed using `equery` is not sufficient to
determine if any changes would be made, so that step is skipped when
the `noreplace` module argument is specified. The module then falls back
to parsing the output from `emerge` to determine if anything changed. In
check mode, `emerge` is called with `--pretend`, so it produces
different output, and the parsing fails to correctly infer that a change
would be made.

This commit adds another regular expression to check when running in
check mode that matches the pretend output from `emerge`.

Signed-off-by: Dustin C. Hatch <dustin@hatch.name>
2016-12-08 11:32:53 -05:00
Dustin C. Hatch c514a9a940 packaging/os/portage: Improve check mode handling
When running in check mode, the *portage* module always reports that no
changes were made, even if the requested packages do not exist on the
system. This is because it was erroneously expecting `emerge --pretend`
to produce the same output as `emerge` by itself would, and attempts to
parse it. This is not correct, for several reasons. Most specifically,
the string for which it is searching does not exist in the pretend
output. Additionally, `emerge --pretend` always prints the requested
packages, whether they are already installed or not; in the former case,
it shows them as reinstalls.

This commit adjusts the behavior to rely on `equery` alone when running
in check mode. If `equery` reports at least one package is not
installed, then nothing else is done: the system will definitely be
changed.

Signed-off-by: Dustin C. Hatch <dustin@hatch.name>
2016-12-08 11:32:53 -05:00
Brian Brazil 6b51454234 Add dpkg_selections module, that works with dpkg --get-selections and --set-selections.
This is mainly useful for setting packages to 'hold' to prevent them
from being automatically upgraded.
2016-12-08 11:32:51 -05:00
Greg DeKoenigsberg c65a612d1f Changes to author formatting, remove emails 2016-12-08 11:32:51 -05:00
NewGyu 80c75bd66f fix cannot download SNAPSHOT version 2016-12-08 11:32:49 -05:00
jonathan.lestrelin 5c4415b821 Fix unused import and variable and correct documentation 2016-12-08 11:32:49 -05:00
jonathan.lestrelin 0452ddd85d Add pear packaging module to manage PHP PEAR an PECL packages 2016-12-08 11:32:49 -05:00
Roman Vyakhirev 16e51e57f8 bower module. Non-interactive mode and allow-root moved to _exec, they should affect all commands 2016-12-08 11:32:48 -05:00
Roman Vyakhirev 414afb61df composer module. ignore_platform_reqs option added. 2016-12-08 11:32:47 -05:00
Dagobert Michelsen d744777425 svr4pkg: assume command worked only on known-to-be-good returncodes 2016-12-08 11:32:43 -05:00
Enric Lluelles 1780512ef5 Add slash to valid characters for packages
To allow it to download packes from taps, or external commands like
caskroom/cask/brew-cask
2016-12-08 11:32:43 -05:00
@RubenKelevra b562dba1bf change -Syy to -Sy
-Syy do always update, which is not needed, since the caches might already be up to date.
2016-12-08 11:32:42 -05:00
Toshio Kuratomi 29692366aa Bandaid dnf module to temporarily fix some major problems
- Backport config file handling from the DNF module rewrite #527
  (Current config handling does not work with dnf and leads to
  tracebacks when run as an unprivileged user).
- Make a mandatory requirement on yum-utils (for /usr/bin/repoquery)
  because none of the fallback code works for dnf (it's unported yum API
  code).

Both of these issues will be fixed better in the dnf rewrite when it is
feature complete.

Fixes #471
2016-12-08 11:32:42 -05:00
QuantumGhost b67e4a19ab Use expanduser to deal with path in bower module
So bower module can correctly handle path containing `~`
2016-12-08 11:32:42 -05:00
Toshio Kuratomi efc63d9c40 Update module_utils "import" to the new-style
Fixes #505
2016-12-08 11:32:41 -05:00
Toshio Kuratomi 4f07e8b256 Many more doc fixes 2016-12-08 11:32:40 -05:00
Toshio Kuratomi ec68f78556 Fix quoting for documentation build 2016-12-08 11:32:39 -05:00
Brian Coca d344a3fde3 more string corrections 2016-12-08 11:32:39 -05:00
Brian Coca 2753cd186a moar quotes 2016-12-08 11:32:39 -05:00
Greg DeKoenigsberg ed2e3869ad Typo in author 2016-12-08 11:32:39 -05:00
Toshio Kuratomi a8c12ec097 Add python >= 2.6 to documented deps 2016-12-08 11:32:36 -05:00
Matt Martz 8bd5757720 Fix up modules that have python24 syntax error 2016-12-08 11:32:36 -05:00
Jeff Rizzo 81a646ddaf Support both new and old pkgin versions by testing if '-p' flag exists. 2016-12-08 11:32:36 -05:00
Julien Vey c5eb378677 Be consistent in the documentation
The documentation for the `state` field is not very clear.

It says possible values are "installed, uninstalled" and default value is "present"
The examples below alow uses `present` and `absent`.

This patch uses "absent" and "present" instead of "installed" and "uninstalled"

Moreover, this is consistent with other packaging modules, like homebrew itself
2016-12-08 11:32:35 -05:00
Roland Ramthun c3ce2eb169 disable ask on sync action 2016-12-08 11:32:35 -05:00
Peter Oliver c8c4305057 Add an accept_licenses option to pkg5 module
This accepts any software licences required by the package.
2016-12-08 11:32:33 -05:00
Brian Coca 0ed579ddd7 doc update for zypper 2016-12-08 11:32:33 -05:00
Gregory Haynes 960b0f478f Add type property to zypper
To install patterns and other package types a type parameter needs to be
specified to zypper.
2016-12-08 11:32:33 -05:00
Jeferson Daniel 2f554518a6 Fixes #335 2016-12-08 11:32:33 -05:00
Simon Olofsson 334c26ca53 homebrew: Package name is not required.
e.g. `- homebrew: update_homebrew=yes upgrade_all=yes' is a valid task.
2016-12-08 11:32:32 -05:00
Robin Roth 4f0e1c850c fixed tab/space mix 2016-12-08 11:32:32 -05:00
Robin Roth 32310a43ae fix local change 2016-12-08 11:32:32 -05:00
Robin Roth e33875e382 Allow multiple versions in rpm state
Fix bug in ansible get_package_state and get_current_version that breaks when there are multiple versions of a package installed and there is a list of packages to install.
The previous implementation used 'zip' to match requested names to installed names which fails, because rpm outputs multiple lines per package when there are multiple versions.

Testcase: Install opensuse, install multiple kernel versions (happens by update)
Before patch: calling
zypper: state=present for name={{item}}
with_items:
  - kernel-desktop
  - git

leads to ansible aborting.
After the patch ansible performs as expected and makes sure both packages are present.
Also the last version number is used for further update information in this version (before if only one package name was given the oldest version number was used).
2016-12-08 11:32:32 -05:00
Brian Coca c04e95865a remove x bit 2016-12-08 11:32:30 -05:00
Brian Coca bed45f3ce9 moved to 2016-12-08 11:32:30 -05:00
chris.schmidt b2247e378b Added check for "latest" in version field 2016-12-08 11:32:30 -05:00
chris.schmidt e7c39a30ca Removed version check from main as it is checked in the download function. Having the check here was breaking "latest version" functionality. 2016-12-08 11:32:30 -05:00
Chris Schmidt 4c71598049 Fixed bug where passing a directory as dest failed 2016-12-08 11:32:30 -05:00
Chris Schmidt 7b46f1215d Changed "target" to "dest" 2016-12-08 11:32:29 -05:00
Chris Schmidt 469e874697 Renamd Module File 2016-12-08 11:32:29 -05:00
Chris Schmidt 73d34220dd Renamted module from download_artifact to maven_artifact 2016-12-08 11:32:29 -05:00
Chris Schmidt 15ac6aa0ea Updated w/ license
Added license
Added TODO for a “latest” state
Removed pending “latest” state work
2016-12-08 11:32:29 -05:00
Chris Schmidt d219e6573f Added the download_artifact module
The download_artifact module resolves a maven dependency coordinate and
downloads the artifact to the target path
2016-12-08 11:32:29 -05:00
Julien Pepy 97ed348e17 Clean options building in Composer module 2016-12-08 11:32:29 -05:00
Toshio Kuratomi 4ada937207 Make our regex match the homebrew tap upstream regex.
Fixes #312
Fixes #297
2016-12-08 11:32:28 -05:00
Larry Gilbert cdc90f723f pkgin: support check mode, make other improvements
* Add support for check mode
* Use "pkgin search" to guarantee 0 or 1 result
* Edit documentation for style, new feature, etc.
* General refactoring
* Lay some groundwork for future support of "state=latest"
2016-12-08 11:32:28 -05:00
Simon JAILLET c7b3dea395 composer: Fix `changed` status
Fix `changed` status that always returns False with composer.

This [previous PR](https://github.com/ansible/ansible-modules-extras/pull/61) had fixed the issue but because of a [Composer recent change](cb336a5416) stderr is now used for reporting information meant for humans while stdout is more for the output of the command.

This PR would definilty solve this issue.
2016-12-08 11:32:27 -05:00
Konstantin 4602ca7bf4 pkgutil.py syntax fix 2016-12-08 11:32:27 -05:00
Dagobert Michelsen 1ff1537329 Adjust setting to better make logic clearer 2016-12-08 11:32:26 -05:00
Dagobert Michelsen 474df33ff3 Correctly report "changed: false" when trying to install a package not in the catalog. This fixes #230 2016-12-08 11:32:26 -05:00
Jeppe Toustrup 0ea2cf77dd NPM: Expand the path before accessing it 2016-12-08 11:32:26 -05:00
Brian Coca 5601a88d71 fixed missing , 2016-12-08 11:32:26 -05:00
Marcus 21a03152dc Add support for mirror_only parameter to cpanm module 2016-12-08 11:32:26 -05:00
Peter Oliver c90eba7dcf Add another example. 2016-12-08 11:32:26 -05:00
Peter Oliver 21a3fd5b20 Fix idempotency when removing packages.
If the package is already not present, then we have nothing to do.
2016-12-08 11:32:25 -05:00
Peter Oliver defdc7c44b Tweak documentation. 2016-12-08 11:32:25 -05:00
Peter Oliver 5c1c2c5c1a Try to fix up commas in version numbers. 2016-12-08 11:32:25 -05:00
Peter Oliver a300ec9d3b Add missing boilerplate. 2016-12-08 11:32:25 -05:00
Peter Oliver 1faee38eac Add Solaris 11 package management
- Module pkg5 handles installing and uninstalling packages.
- Module pkg5_publisher manages repository configuration.
2016-12-08 11:32:25 -05:00
Matthew Pherigo 11a68b4cad Make $BATCH=yes the default, remove module option 2016-12-08 11:32:25 -05:00
Matthew Pherigo 5664da4c63 pkgng: add 'batch' parameter
Some packages attempt to prompt the user for certain settings during
installation. Thus, this parameter sets the environment variable
$BATCH to 'yes', which forces package installation scripts to accept
default values for these interactive prompts. This should work for all
prompts that have a default value and aren't implemented through a
custom script (as this variable is built into the ports/package system).

FIXME: Package install should fail if it prompts and batch isn't set;
currently, the install hangs indefinitely.
TODO: Allow user to specify the answers to certain prompts.

I (github.com/mwpher) have NOT tested this with any packages besides
bsdstats. It's a small improvement, but not a complete answer to all
the complexities of package installation.
2016-12-08 11:32:24 -05:00
Andrew Udvare a59770e02d Add support for emerge's --getbinpkg and --usepkgoonly 2016-12-08 11:32:24 -05:00
Daniel Newport 438a5a730e use state=latest to ensure the latest version is installed. mimics functionality of the apt and yum modules. 2016-12-08 11:32:24 -05:00
Daniel Newport 3e7ab59eb4 fix pacman upgrade bug 2016-12-08 11:32:24 -05:00
Julien Pepy de442415a0 Fix composer module checkmode and change detection 2016-12-08 11:32:24 -05:00
Toshio Kuratomi 8c63ebcf5e Move dnf and bower plugins to proper subdirs 2016-12-08 11:32:24 -05:00
Toshio Kuratomi 3876df5911 Make documentation of urpmi module force parameter clearer 2016-12-08 11:32:24 -05:00
Toshio Kuratomi 7941681591 Fix documentation in zypper_repository 2016-12-08 11:32:23 -05:00
Justin Lecher 1f0b0ad3cd Keep default behaviour for refresh
Signed-off-by: Justin Lecher <jlec@gentoo.org>
2016-12-08 11:32:23 -05:00
Justin Lecher 90f5e1925e Allow disabling of autorefresh for zypper repositories
In case of release repositories or other special cases you might not
need the autorefreshing of the repos. This patch adds a configure
option instead of hard enabling this.

Signed-off-by: Justin Lecher <jlec@gentoo.org>
2016-12-08 11:32:23 -05:00
nmeum 883cd22821 Make sure portage doesn't ask for confirmation
If EMERGE_DEFAULT_OPTS in make.conf(5) contains '--ask' then the portage
module doesn't work correctly, this commit fixes that
2016-12-08 11:32:23 -05:00
Alexander Gubin 117ae098ef zypper: Fix gpg check option for state=latest. --no-gpg-checks is used in new and old zypper versions 2016-12-08 11:32:22 -05:00
Jeroen Thora 26ae02b2f5 Small typo fix 2016-12-08 11:32:22 -05:00
Cristian Van Ee e7146ed265 Fixed cachedir function 2016-12-08 11:32:21 -05:00
Cristian van Ee b0a1baa981 Created dnf package manager module, based on the yum package manager module. 2016-12-08 11:32:21 -05:00
Michael Warkentin 7925c0a453 Add bower module 2016-12-08 11:32:20 -05:00
Artem Chernikov b4c6b81619 Fixing SuSE to SUSE as latter is the right one since some time 2016-12-08 11:32:20 -05:00
Michael DeHaan 7d6ceb4f06 Reorganization. 2016-12-08 11:32:19 -05:00
Eric Hanchrow aff36f5a97 Clarify doc for cpan module
... note that you can pass names that include a precise version number.
2016-12-08 11:32:19 -05:00
Boris Manojlovic b1ec3fd57e fixed zypper.py and zypper_repository.py for SLE10 platform 2016-12-08 11:32:19 -05:00
anatoly techtonik cb70fbc9d1 composer: Fix `changed` status that always returns False
re.match in has_changed function never worked properly, because match
requires searched sequence to be present exactly at a start of processed
string, which is not the case here.
2016-12-08 11:32:19 -05:00
Mikolaj Chwalisz 5e9f16b206 opkg: fix package state detection 2016-12-08 11:32:19 -05:00
Paul Nicholson 8875d45632 Add missing __init__.py files for find_package() to work 2016-12-08 11:32:19 -05:00
Patrik Lundin 66cb7f1a37 openbsd_pkg: revert "changed" simplification.
module.exit_json() does not like when the "changed" variable contains a
match object:

TypeError: <_sre.SRE_Match object at 0x81e2ae58> is not JSON serializable
2016-12-08 11:32:18 -05:00
Patrik Lundin 98dcb3a006 Simplify logic by using required=True. 2016-12-08 11:32:18 -05:00
James Cammarata e7405643e1 Refactor openbsd package upgrade change to work more like yum/apt 2016-12-08 11:32:18 -05:00
Patrik Lundin 6aaf5eb1d6 openbsd_pkg: add upgrade argument.
Running the module with the argument "upgrade=yes" invokes an upgrade of
all installed packages.

While here clean up some comments.

Functionality requested by @qbit.
2016-12-08 11:32:18 -05:00
Michael DeHaan 5879c503bb File extensions! 2016-12-08 11:32:18 -05:00
James Cammarata d4b117843a Copying snapshot of extras modules 2016-12-08 11:32:07 -05:00