* * pkgin query_package(..) understands now also package name with version (my-package-1.2nb123456). * pkgin query_package(..) will distinct between not-installed and not-found packages. * pkgin install_package(..) fails with proper error if a non-existing package is attempted to be installed.
* fixup ansibot comments
* add changelog fragment
* add example
* use more pythonic condition
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
* remove extra dot between description and link to PR
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
* fix file extension of changelog fragment
* add pkgin unit tests for query_package function
* fix pep8 issues
* use enum Flag instead mix of strings, bools and None as return value
* use IntEnum instead Flag to support Python versions >= 2.6
* fix pep8 and pylint errors
* use regular class instead enum to avoid issues with older Python releases
* fix comment
* remove the combined package state since without an IntFlag or Flag the usage of it would require to use logical operators
Co-authored-by: Erik van Nooijen <eric.vannooijen@tomtom.com>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
* [pkgng] introduce IGNORE_OSVERSION to pkgng
* [pkgng] add small description about IGNORE_OSVERSION
- source: https://www.freebsd.org/cgi/man.cgi?query=pkg.conf&sektion=5
* [pkgng] initialize default value of 'ignoreosver' as False
* [pkgng] replace double quotes by single ones, when setting 'ignoreosver'
* [pkgng] do not make 'ignoreosver' a required option for this module
* [pkgng] mode the point we set IGNORE_OSVER into install_packages()
* [pkgng] restrict the use of 'ignoreosver' to pkg versions >= 1.11
- https://github.com/freebsd/pkg/blob/release-1.11/NEWS#L51
* [pkgng] value of 'ignoreosver' passed to install_packages
- install_packages() contains a taks to update local pkgs cache;
- should that update be triggered, AND 'ignoreosver' is set to True,
we must change existing "batch_var" and add the IGNORE_OSVERSION=yes
to the environment;
- there pkg running on STABLE or CURRENT FreeBSD machines will have a
chance to proceed with the "update" action
* [pkgng] create option description for "ignoreosver" and its defaults
* [pkgng] make sure we do use IGNORE_OSVERSION when action is "update"
* [pkgng] add more information on how 'ignoreosver' works
Signed-off-by: Vinicius Zavam <egypcio@googlemail.com>
* [pkgng] create changelog fragment for PR #1243
Signed-off-by: Vinicius Zavam <egypcio@googlemail.com>
* [pkgng] add information about when we start to offer 'ignoreosver'
Signed-off-by: Vinicius Zavam <egypcio@googlemail.com>
* [pkgng] rename 'ignoreosver' -> 'ignore_osver'
Signed-off-by: Vinicius Zavam <egypcio@googlemail.com>
* [pkgng] remove unnecessary backslashes for install_packages() call
Signed-off-by: Vinicius Zavam <egypcio@googlemail.com>
* [pkgng] fix changelog fragment's formating
Signed-off-by: Vinicius Zavam <egypcio@googlemail.com>
* Add OpenBSD pkg_add(1) snapshot support
* Fix documentation syntax
Co-authored-by: Felix Fontein <felix@fontein.de>
* Bump version_added
Co-authored-by: Felix Fontein <felix@fontein.de>
* zap one trailing whitespace
The first trailing whitespace is necessary otherwise we cal pkg_add(1)
with '-Im-Dsnap' which is invalid.
* Check build flag in package_present()
* zap one trailing whitespace
The first trailing whitespace is necessary otherwise we cal pkg_add(1)
with '-Im-Dsnap' which is invalid.
* check snapshot/build combination a little earlier
* Update "Force" documentation
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
* Bump version tgo 1.3.0
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add a changelog fragment.
* Update plugins/modules/packaging/os/openbsd_pkg.py
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
* Add: mutually exclusiv hint for "build" and add mutually_exclusive
* Re-add build=%s check
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
* Fix lang issue on zypper absent
* Add fragment changelog
* Update changelogs/fragments/1175-zypper-absent-lang.yml
Some outfit
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add getbinpkgonly (-G) to portage
* version_added for getbinpkgonly
* Format description nicely, add the mutually exclusive nature of the 'pkg' options, and correct usepkgonly
* Changelog fragement
* Formatting
* Update changelogs/fragments/1169-getbinpkgonly.yaml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Remove all exclusiveness, portage makes no such restrictions
Co-authored-by: Mike Williams <mike.williams@sectigo.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
For each package check membership in the list instead of checking each
package individually using pacman to see if it is a pacman group.
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* pkgutil: add update all, check-mode, squashing and examples
Taken from https://github.com/ansible/ansible/pull/51651 by dagwieers, which was taken from https://github.com/ansible/ansible/pull/27866 by scathatheworm. Let’s have one last attempt to get this merged.
> ##### SUMMARY
>
> Original PR #27866 from scathatheworm
>
> When working with Solaris pkgutil CSW packages, I came across this module being very basic in functionality, in particular, that I could not use it to update all CSW packages.
>
> When going into details into the code I also found it did not incorporate a possibility of doing dry-run from the underlying utility, or supported to specify multiple packages for operations.
>
> This module probably sees very little use, but it seemed like nice functionality to add and make it behave a little more like other package modules.
> ##### ISSUE TYPE
>
> * Feature Pull Request
>
>
> ##### COMPONENT NAME
>
> pkgutil module
> ##### ANSIBLE VERSION
>
> ```
> ansible 2.3.1.0
> config file = /etc/ansible/ansible.cfg
> configured module search path = Default w/o overrides
> python version = 2.7.5 (default, Aug 2 2016, 04:20:16) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]
> ```
>
> ##### ADDITIONAL INFORMATION
>
> * Added ability to upgrade all packages:
>
>
> ```yaml
> - pkgutil:
> name: '*'
> state: latest
> ```
>
> * Added ability to modify state of a list of packages:
>
>
> ```yaml
> - pkgutil:
> name:
> - CSWtop
> - CSWwget
> - CSWlsof
> state: present
> ```
>
> * Added ability to have underlying tool perform a dry-run when using check mode, pkgutil -n
>
> * Added ability to configure force option to force packages to state determined by repository (downgrade for example)
>
>
> ```yaml
> - pkgutil:
> name: CSWtop
> state: latest
> force: yes
> ```
>
> * Added more examples and documentation to show the new functionality
* Add changelog fragment.
* Observe changelog style guide
https://docs.ansible.com/ansible/devel/community/development_process.html#changelogs
Co-authored-by: Felix Fontein <felix@fontein.de>
* Since module split, version_added no-longer refers to core Ansbile
Co-authored-by: Felix Fontein <felix@fontein.de>
* Tweak documentation
* Apply the new `elements` feature for specifying list types
Co-authored-by: Felix Fontein <felix@fontein.de>
* Set version_added
Co-authored-by: Felix Fontein <felix@fontein.de>
* Document `pkg` alias for `name`
* Be explicit about the purpose of states `installed` and `removed`.
* Force the user to specify their desired state.
* Review documentation for pkgutil module.
* Fully qualify svr4pkg module name
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Fix for casks with @ in the name
* Add changelog fragment
* Update changelogs/fragments/homebrew-cask-at-symbol-fix.yaml
Period required at the end of changelog entry
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
* Use double backticks
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
* pacman: Treat .zst package names as files
* pacman: add changelog for .zst support
* pacman: refer to pull-request in changelog fragment
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: gileri <e+git8413@linuxw.info>
Co-authored-by: Felix Fontein <felix@fontein.de>
* pkgng: Add support for upgrading all installed packages
Adds support for ``name: "*", state: latest`` to upgrade all installed
packages, similar to other package providers.
Co-authored-by: Felix Fontein <felix@fontein.de>
* pkgng: Improve wording for warning in example, fix formatting
* pkgng.py: Fix capitalization
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Davíð Steinn Geirsson <david@isnic.is>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Remove all packaging sanity tests to see errors
* fix
* Fix
* Minor fixes
* Fix
* Fix redhat
* Fix redhat_subscription
* Fix redhat_subscription
* Fix redhat_subscription
* Ignore redhat_subscription return-syntax-error
* Remove more ignored sanity tests
* Remove force from xbps argument_spec as it doesn't do anything(?)
* Remove unnecessary sanity test for xbps
* Fix suggestions made by felixfontein
* Better changelog description, fix portage wrong default values
* Fix
* Fix
* Remove root default from urpmi doc
* Fix wrong type of default for booleans
* Add default value as suggested by felixfontein
* Fix changelog
* pkgng: Add stdout and stderr to response object
To ease debugging if something goes wrong during pkg run.
* pkgng: Fix crash when run with autoremove
Fix crash when run with "autoremove: yes" but no packages
need to be autoremoved.
* Add changelog fragment for pull request 560
* Formatting changes for changelogs/fragments/560-pkgng-add-stdout-and-stderr.yaml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Davíð Steinn Geirsson <david@isnic.is>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Fixes#143, change package parameter from str to list
* remove uneccessary splitting
* add changelog fragment
* fix parameter-list-no-elements validation
* fix documentation
* Fix changelog
* Fix documetation, add example with list of packages
* Update changelogs/fragments/apt_rpm_typefix.yml
Co-authored-by: Alexander Leshkov <lam@arenadata.io>
Co-authored-by: Felix Fontein <felix@fontein.de>
* slackpkg: fix matching some special cases in package names.
* Add chagelog/fragments file
* Update changelogs/fragments/505-slackpkg_fix_matching_some_special_cases_in_package_names.yml
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
* Adjust deprecation versions.
* Remove redirects that are already made in ansible/ansible's ansible_builtin_runtime.yml
* Remove modules that were moved to the google.cloud collection according to ansible/ansible's ansible_builtin_runtime.yml.
* The _info module is in google.cloud.
* The gcp doc_fragment is a copy of the one in google.cloud and is only used by one lookup. Mark as deprecated/internal.
* Remove entries of modules that no longer exist.
* Update ignore.txt.
* Try to fix test.
* Remove debug output.
* Add version_added: 1.0.0 for all new features added before pre-ansible-base.
* Add version_added: 1.0.0 for all new features.
* Next release will be 0.2.0
* Fix error.
* Remove unnecessary warnings.
* slackpkg: fix name matching in package installation (#450)
* Escape re parameters and optimize matching as suggested in code review.
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update changelogs/fragments/450-slackpkg-package-matching.yml
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
* Added 'extra_install_args' option to allow extra upgrade/install
Example zypper args for this is
* --allow-vendor-change
* --replacefiles and
* --force-resolution
* Fix comment issue..
* Change extra_install_args option to a list.
Improved doc.
* Update plugins/modules/packaging/os/zypper.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/packaging/os/zypper.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Switch from using extra_install_args to individual module options.
* Fix syntax errors and limit 'allow-vendor-change' to 'dist-upgrade'
* Removed un-needed import
* Added changelog fragment
* Added tests for zypper replacefiles and allow_vendor_change options
* Removed dist-upgrade as it changes the test environment.
And it is hard to undo.
* Added proper test of replacefiles zypper option
Buiding two rpm packages containing same file path but with different content.
Making sure we fail to install them without the replacefiles options and that we succeed
using it.
* Make sure to create directory before writing files
* Fix indentation of ignore_errors
* Correct genereated rpm file name
* Improved duplicate file assertions
* Ensure no previous netcat package still exists.
* Corrected naming of example task.
* Fix variable name typo.
* Fix proper duplicate_content access
* Make sure to clean up duplicate rpms after tests.
* Removed debug
* Removed version_added of option allow_vendor_change and replacefiles
Co-authored-by: Felix Fontein <felix@fontein.de>
Using a list ensures that all subprocess arguments are correctly
escaped. By building strings and then calling .split(), potential
arguments with a space will be incorrectly split over two arguments.
When a string is needed for presentation, join to the list to build the
string.
* flatpak: Change use of Popen to module.run_command()
* Update changelogs/fragments/274-flatpak-run-command.yaml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix(modules/xbps): do not upgrade in check mode
Ensure that while in check mode, this module does not upgrade all
packages on the system.
* chore(modules/xbps): refactor update_cache
Pull out the update_cache logic from the main function.
* feat(modules/xbps): upgrade xbps package itself
Perform an upgrade of the xbps package itself, when necessary.
Otherwise, users' playbooks will fail to install or upgrade packages
when the xbps version is out of date.
See https://github.com/void-linux/xbps/issues/229 for more information.
homebrew now returns details about changed and unchanged packages
after performing the operations.
Fixes: ansible/ansible#59376
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>