pacman: add support for remove_nosave (#4316)

* pacman: add support for remove_nosave

New parameter: remove_nosave
When enabled, will pass --nosave to pacman when removing packages.
--nosave cannot be used with --print-format and thus it couldn't be
passed via extra_args. See #4315

The code adds the option right before the actual removal of the pkgs.

(This is based on an initial diff from MorphBonehunter)

* changelog

* Update plugins/modules/packaging/os/pacman.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* wording

* ssss

* remove_package: simplify {force,extra,nosave}_args

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Jean Raby 2022-03-08 01:21:40 -05:00 committed by GitHub
commit c698ecd201
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 94 additions and 13 deletions

View file

@ -9,3 +9,4 @@
# Add more tests here by including more task files:
- include: 'basic.yml'
- include: 'package_urls.yml'
- include: 'remove_nosave.yml'