Commit Graph

178 Commits (2858d24acb1f593dd3849ade68fc29c48fec8cee)

Author SHA1 Message Date
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
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
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
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
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
Greg DeKoenigsberg c65a612d1f Changes to author formatting, remove emails 2016-12-08 11:32:51 -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
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
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
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
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
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
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
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