1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
Commit graph

1697 commits

Author SHA1 Message Date
patchback[bot]
ec86ebed98
[PR #6269/a64e3682 backport][stable-6] mksysb: improve visibility on the output (#6291)
mksysb: improve visibility on the output (#6269)

* mksysb: improve visibility on the output

* add changelog frag

(cherry picked from commit a64e36820f)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2023-04-05 14:10:47 +02:00
patchback[bot]
f6d15ec818
[PR #6278/cee5f31b backport][stable-6] Add support to topics on Gitlab Project module (#6283)
Add support to topics on Gitlab Project module (#6278)

* add topics to gitlab_project.py

* add chngelog fragment

* fix lint error

* Update changelogs/fragments/6277-add-topics-gitlab-project.yml

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

* Apply suggestions from code review

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit cee5f31b70)

Co-authored-by: Lorenzo Tanganelli <35271287+tanganellilore@users.noreply.github.com>
2023-04-03 22:15:23 +02:00
patchback[bot]
f0320b5ac9
[PR #6275/c280b793 backport][stable-6] redhat_subscription: fix D-Bus option for environments on CentOS (#6282)
redhat_subscription: fix D-Bus option for environments on CentOS (#6275)

Factorize the current logic to determine whether use 'environments' as
D-Bus registration option (rather than 'environment') in an own
function, so it is easier to read it and maintain it.

With the small helper function in place, extend the logic to support
CentOS: it is in practice the same as the RHEL one, with an additional
check to support CentOS Stream 8 (which is a rolling release, and not
versioned).

(cherry picked from commit c280b793de)

Co-authored-by: Pino Toscano <ptoscano@redhat.com>
2023-04-03 22:02:12 +02:00
patchback[bot]
43beaf4b00
[PR #6259/c9e11e5c backport][stable-6] redhat_subscription: manually unregister only when registered (#6280)
redhat_subscription: manually unregister only when registered (#6259)

When registering using D-Bus and using a version of subscription-manager
with an unimplemented 'force' option, then unregister manually the
system only if it is registered. 'subscription-manager unregister'
errors out when trying to unregister an already unregistered system.

(cherry picked from commit c9e11e5c0c)

Co-authored-by: Pino Toscano <ptoscano@redhat.com>
2023-04-03 21:25:53 +02:00
patchback[bot]
6b0cc3c1de
[PR #6212/33093e9f backport][stable-6] pipx: document parameters supported with state=latest, and fix include_injected parameter (#6266)
pipx: document parameters supported with state=latest, and fix include_injected parameter (#6212)

* pipx: Document parameters supported with state=latest

* pipx: Support "include_injected" with states "upgrade" and "latest"

- Contrary to documentation, "include_injected" doesn't appear to have
  worked with state=upgrade since it was introduced.
- Add support for include_injected with "latest", since "latest" is
  specified as being install+upgrade.

* Add changelog fragment

* Update plugins/modules/pipx.py

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

* Update changelog fragment

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

* pipx: Update to correct target release of community.general

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 33093e9f3e)

Co-authored-by: Paul Aurich <paul@darkrain42.org>
2023-03-30 07:52:45 +02:00
patchback[bot]
8fb1aaaf53
[PR #5815/5e1e8d06 backport][stable-6] ldap_entry documentation is lacking examples (#6255)
ldap_entry documentation is lacking examples (#5815)

* Add changelog fragment

* Add documentation for possible values of LDAP entry attributes

* Add PR information

* Update plugins/modules/ldap_entry.py

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* remove changlog

* Update docstring

* Align ldap_attrs doc to ldap_entry module

* Update plugins/modules/ldap_attrs.py

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

* Change formulations.

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 5e1e8d06ef)

Co-authored-by: Cédric Servais <cedric.servais@outlook.com>
2023-03-27 19:20:57 +00:00
patchback[bot]
fda610cc23
[PR #6250/05824a07 backport][stable-6] merge_variables: Fix example section (#6251)
merge_variables: Fix example section (#6250)

(cherry picked from commit 05824a0754)

Co-authored-by: Roy Lenferink <lenferinkroy@gmail.com>
2023-03-26 14:02:59 +00:00
patchback[bot]
8ecb322816
[PR #5533/f52dd194 backport][stable-6] Add new merge_variables lookup plugin (#6249)
Add new merge_variables lookup plugin (#5533)

* Add new merge_variables lookup plugin

* Add changelog fragment

* Process bot feedback

* Refactor override options and add pattern_type option

* Fix unit tests

* Changed default pattern_type and simplified plugin based on feedback

* Processed feedback for merge_variables lookup plugin

* Adjust version_added.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit f52dd194f9)

Co-authored-by: Roy Lenferink <lenferinkroy@gmail.com>
2023-03-26 13:36:46 +02:00
patchback[bot]
1260a63241
[PR #6210/be7f11bf backport][stable-6] Add worklog functionality to jira module (#6248)
Add worklog functionality to jira module (#6210)

community.general#6209 Add worklog functionality to jira

(cherry picked from commit be7f11bf39)

Co-authored-by: Hugo Prudente <hugo.kenshin@gmail.com>
2023-03-26 10:21:49 +02:00
patchback[bot]
f6aad230c2
[PR #6182/99776187 backport][stable-6] Add module to manipulate KDE config files using kwriteconfig (#6247)
Add module to manipulate KDE config files using kwriteconfig (#6182)

* Add module to manipulate KDE config files using kwriteconfig

* Fix license issues

* Apply suggestions from code review

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

* Add smeso as kdeconfig.py maintainer

* Fix attributes fragment name

* Fix test

* Do not use shutil.chown

It isn't available on old Python versions

* Apply suggestions from code review

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 997761878c)

Co-authored-by: Salvatore Mesoraca <s.mesoraca16@gmail.com>
2023-03-26 10:05:57 +02:00
patchback[bot]
f3a4e5ea27
[PR #6200/59e58079 backport][stable-6] Adding open option to nmap (#6246)
Adding `open` option to nmap (#6200)

* Adding nmap `open` option

* Removing accidental copy/paste issue

* Update changelogs/fragments/6200-adding-open-option-to-nmap.yml

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

* Update plugins/inventory/nmap.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 59e58079cb)

Co-authored-by: barloff-st <42866449+barloff-st@users.noreply.github.com>
2023-03-26 10:04:13 +02:00
patchback[bot]
e26eaa0565
[PR #6227/cd706454 backport][stable-6] Fixed XenOrchestra inventory plugin failing due to not checking response ID. (#6245)
Fixed XenOrchestra inventory plugin failing due to not checking response ID. (#6227)

* Added call method to select proper response from xo server

* Added changelog fragment

* Removed excess blank lines

* Moved period in changelog fragment

* Made suggested changes

* Remove f-strings for Python 2.7 compatibility

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

---------

Co-authored-by: Linus Kirkwood <lkirkwood@allette.com.au>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit cd706454ec)

Co-authored-by: lirkwood <linuskirkwood@gmail.com>
2023-03-26 10:04:05 +02:00
patchback[bot]
3432be3a2f
[PR #6105/81b16a88 backport][stable-6] nmcli: fixed idempotency issue when config bridge connection (#6243)
nmcli: fixed idempotency issue when config bridge connection (#6105)

* nmcli: fixed idempotency issue when config bridge connection

* Update changelog fragment.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 81b16a88ee)

Co-authored-by: Sam Potekhin <heaveaxy@gmail.com>
2023-03-26 09:48:29 +02:00
patchback[bot]
4f78e7979e
[PR #6148/d4f272ba backport][stable-6] nmcli: add runner_fast_rate option (#6239)
nmcli: add runner_fast_rate option (#6148)

* add runner_fast_rate option

* unset default value for runner_fast_rate parameter

* add some commas

* Remove default in copy of argspec.

Co-authored-by: Sam Potekhin <eax24@ya.ru>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Sam Potekhin <eax24@ya.ru>
(cherry picked from commit d4f272ba52)

Co-authored-by: Alex Groshev <38885591+haddystuff@users.noreply.github.com>
2023-03-26 09:46:04 +02:00
patchback[bot]
8a0b7dcdc9
[PR #6106/5ee68704 backport][stable-6] nmcli: fixed idempotency issue with 'may_fail4' when 'method' is 'disabled' (#6241)
nmcli: fixed idempotency issue with 'may_fail4' when 'method' is 'disabled' (#6106)

* nmcli: fixed idempotency issue with 'may_fail4' when 'method' is 'disabled'

* added note to documentation

* updated changelog fragment

* Update changelog fragment.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 5ee687049f)

Co-authored-by: Sam Potekhin <heaveaxy@gmail.com>
2023-03-26 09:45:57 +02:00
patchback[bot]
9cd3f37686
[PR #6198/6fa833fe backport][stable-6] pipx: Allow injected modules to add apps (#6238)
pipx: Allow injected modules to add apps (#6198)

* pipx: Allow injected modules to add apps

Add support for pipx inject's "--include-apps" parameter.

* add changelog fragment

* fix pipx test ("install_apps", not "include_apps")

* fix pipx test -- add a second invocation for install_apps

* Update changelogs/fragments/6198-pipx-inject-install-apps.yml

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

* Update plugins/modules/pipx.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 6fa833feed)

Co-authored-by: Paul Aurich <paul@darkrain42.org>
2023-03-26 09:45:48 +02:00
patchback[bot]
5e1508e0df
[PR #6205/e9655239 backport][stable-6] ssh_config: add proxyjump option (#6236)
ssh_config: add proxyjump option (#6205)

* feat(ssh_config): proxyjump option

* feat(ssh_config: add proxyjump test

* CamelCase ProxyJump

* add changelog fragment

* Update plugins/modules/ssh_config.py

add version_added

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

* update task name to include new proxyjump option

* adding tests for proxyjump option

* fixing assert variable name

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit e96552396e)

Co-authored-by: Gavin Will <g@gavinwill.me.uk>
2023-03-25 23:36:56 +01:00
patchback[bot]
be4d294b61
[PR #6208/33ccabed backport][stable-6] added hpe thermal config and fan percent min (#6237)
added hpe thermal config and fan percent min (#6208)

* added hpe thermal config and fan percent min

* typo fixed

* Create 6208-hpe-thermal-fan-percent.yaml

* fixed changelog fragment

* Update 6208-hpe-thermal-fan-percent.yaml

(cherry picked from commit 33ccabed13)

Co-authored-by: ky13 <k.william.ritchie@gmail.com>
2023-03-25 23:36:47 +01:00
patchback[bot]
1d36db1806
[PR #6159/7059789f backport][stable-6] Add archive param for proxmox_kvm module (#6235)
Add archive param for proxmox_kvm module (#6159)

We simply add a param to allow proxmox administrator to restore VM from
an archives. This new option will be useful to automate automatic
creation and restore of VM.

Co-authored-by: Julian Vanden Broeck <julian.vandenbroeck@dalibo.com>
(cherry picked from commit 7059789f35)

Co-authored-by: Julian <374571+l00ptr@users.noreply.github.com>
2023-03-25 08:50:37 +01:00
patchback[bot]
16a18d1456
[PR #3935/f3be0076 backport][stable-6] Add Gitlab group runners support (#6234)
Add Gitlab group runners support (#3935)

(cherry picked from commit f3be0076af)

Co-authored-by: Léo GATELLIER <26511053+lgatellier@users.noreply.github.com>
2023-03-25 08:50:28 +01:00
patchback[bot]
493fa405e2
[PR #5867/b1d94385 backport][stable-6] apt_rpm: add clean, dist_upgrade and update_kernel (#6233)
apt_rpm: add clean, dist_upgrade and update_kernel (#5867)

* clean performs apt-get clean.

* dist_upgrade performs apt-get dist-upgrade.

* update_kernel performs update-kernel to upgrade kernel packages.

* update_cache, clean, dist_upgrade and update_kernel can be used with and without specified packages.

(cherry picked from commit b1d94385ae)

Co-authored-by: Andrey Cherepanov <sibskull@gmail.com>
2023-03-25 08:50:19 +01:00
patchback[bot]
25464602d9
[PR #5974/ed8049a2 backport][stable-6] nmcli: add new addr_gen_mode6 options (#6228)
nmcli: add new addr_gen_mode6 options (#5974)

* nmcli: add new addr_gen_mode6 options

* Add changelog fragment.

* Update plugins/modules/nmcli.py

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

* Adjust documentation.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit ed8049a220)

Co-authored-by: Jeffrey Cutter <jeffmcutter@users.noreply.github.com>
2023-03-25 08:22:25 +01:00
patchback[bot]
47b8df8019
[PR #5664/bbd68e26 backport][stable-6] redhat_subscription: require credentials only when needed (#6222)
redhat_subscription: require credentials only when needed (#5664)

The module currently has a static 'required_if' statement for its
parameters that forces any of 'username' or 'activationkey' or 'token'
in case state=present; while this is generally a good idea, it can be
an extra requirements in some cases. In particular, if the system is
already registered, there is no need for credentials -- some of the
operations of the module, such as manipulating pools, can be done
perfectly without credentials.

Hence:
- change the static 'required_if' to require credentials only when
  forcing the registration
- check for credentials manually when a registration is needed, i.e.
  on an unregistered system; the fail message is the same as the one
  shown by 'required_if'

Adapt the tests to this new situation:
- test_without_required_parameters now needs to mock an unregistered
  system
- add a new version of test_without_required_parameters to test an
  already registered system
- add a simple test case for only state=present usable on an already
  registered system
- remove the credentials from a test case for pool attachment that
  mocks an already registered system

(cherry picked from commit bbd68e26a2)

Co-authored-by: Pino Toscano <ptoscano@redhat.com>
2023-03-22 20:56:22 +01:00
patchback[bot]
9c411586ea
[PR #6211/9f67cbbe backport][stable-6] rhsm modules: cleanly fail when not run as root (#6218)
rhsm modules: cleanly fail when not run as root (#6211)

subscription-manager on RHEL installs a symlink in /usr/bin to
console-helper (part of usermode), which triggers an interactive prompt
for root credentials when run as user. It seems that console-helper
does not handle well non-interactive contexts (e.g. without a TTY for
input), and thus it will hang waiting for input when run as user in an
Ansible task.

Since subscription-manager requires root already anyway (and it will
fail when explicitly run as user), then apply the same logic locally on
all the modules that interact with it: redhat_subscription,
rhsm_release, and rhsm_repository.

(cherry picked from commit 9f67cbbe36)

Co-authored-by: Pino Toscano <ptoscano@redhat.com>
2023-03-22 17:57:46 +00:00
patchback[bot]
e0465d1f48
[PR #6111/3fb1ff0b backport][stable-6] Fix influxdb_user grants in check mode (#6214)
Fix influxdb_user grants in check mode (#6111)

* Fix influxdb_user grants in check mode

When running in check mode, `influxdb_user` will return error when the user doesn't exist yet, instead of reporting `changed` state.

* Update changelogs/fragments/6111-influxdb_user-check-mode.yaml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 3fb1ff0b72)

Co-authored-by: Petr Tichý <petr@pex.com>
2023-03-22 13:16:21 +01:00
patchback[bot]
ad6c28069a
[PR #6180/f66cc7c9 backport][stable-6] Replace deprecated error with BadZipFile (#6216)
Replace deprecated error with BadZipFile (#6180)

* Replace deprecated error with BadZipFile

* Use imported BadZipFile

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

* Add news fragment

* Update new fragment

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit f66cc7c933)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-03-22 13:16:05 +01:00
patchback[bot]
31a1c8e185
[PR #6185/512bf4b7 backport][stable-6] ldap moduls: add optional ca_cert_file option (#6217)
ldap moduls: add optional ca_cert_file option (#6185)

* add ca_cert_file option

* fix pr url

* Apply suggestions from code review

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

* update parameter name

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 512bf4b77f)

Co-authored-by: Reto Kupferschmid <kupferschmid@puzzle.ch>
2023-03-22 13:15:48 +01:00
patchback[bot]
20bd0d130c
[PR #6165/bf8f2950 backport][stable-6] Adding support for -p option to specify port(s) to scan (#6207)
Adding support for `-p` option to specify port(s) to scan (#6165)

* Adding support for `-p` option to specify port(s) to scan

* Adding changelog fragment file

* Corrected appending options

* Edit to doc section

* Correction in documentation type

* Fixed `:` use in doc breaking yaml

* Update changelogs/fragments/6165-nmap-port.yml

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

* Update plugins/inventory/nmap.py

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

* Update plugins/inventory/nmap.py

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

* Adding usage example

* Adding comment to example that was missed

* Breaking line up, was too long for sanity test 160 char limit

* Still too long since spaces are counted

* Changed type to string to work for a single entry as well as comma separated values

* Update changelogs/fragments/6165-nmap-port.yml

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

* Update plugins/inventory/nmap.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit bf8f2950b4)

Co-authored-by: barloff-st <42866449+barloff-st@users.noreply.github.com>
2023-03-19 13:54:53 +01:00
patchback[bot]
8fd89721cd
[PR #6154/1dd86bcb backport][stable-6] add optional use_tls parameter (#6191)
add optional use_tls parameter (#6154)

* add optional use_tls parameter

* add optional use_tls parameter

---------

Co-authored-by: Martin Helwig <prostep.helwig@extaccount.com>
(cherry picked from commit 1dd86bcb55)

Co-authored-by: Martin Helwig <115872657+MartinHelwig@users.noreply.github.com>
2023-03-15 07:29:48 +01:00
patchback[bot]
b1231c1315
[PR #6149/b97bee3f backport][stable-6] openbsd_pkg: set TERM to 'dumb' in execute_command (#6190)
openbsd_pkg: set TERM to 'dumb' in execute_command (#6149)

* openbsd_pkg: set TERM to 'dumb' in execute_command

Keeps pkg_add happy when someone running ansible is using a TERM that
the managed OpenBSD host does not know about.

Fixes #5738.

Selection of specific TERM from discussion at
https://marc.info/?l=openbsd-tech&m=167290482630534&w=2

* Add changelog fragment for openbsd_pkg TERM fix

* Update changelogs/fragments/6149-openbsd_pkg-term.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit b97bee3fd6)

Co-authored-by: Patrik Lundin <patrik@sigterm.se>
2023-03-15 07:29:38 +01:00
patchback[bot]
48b20894b3
[PR #6129/df34569f backport][stable-6] Updating yarn.list to not fail when when warnings are emitted (#6189)
Updating yarn.list to not fail when when warnings are emitted (#6129)

* Updating yarn.list to not fail when when warnings are emitted

* Adding changelog fragment

* Adding _process_yarn_error function

* - Adding back changes to the changelog fragment
- Fixing formatting

* Fix trailing whitespace

* Update plugins/modules/yarn.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit df34569fad)

Co-authored-by: John Daly <john.daly2@gmail.com>
2023-03-15 07:28:40 +01:00
patchback[bot]
1676b09573
[PR #6122/e939cd07 backport][stable-6] redhat_subscription: use D-Bus for registration if possible (#6188)
redhat_subscription: use D-Bus for registration if possible (#6122)

subscription-manager currently does not have a way to get credentials
(username, password, activation keys, organization ID) in a secure way:
the existing command line parameters can be easily spotted when running
a process listing while 'subscription-manager register' runs.
There is a D-Bus service, which is used by e.g. cockpit and Anaconda to
interface with RHSM (at least for registration and common queries).

Try to perform the registration using D-Bus, in a way very similar to
the work done in convert2rhel [1] (with my help):
- try to do a simple signal test to check whether the system bus works;
  inspired by the login in the dconf module
- pass most of the options as registration options; for the few that are
  not part of the registration, execute 'subscription-manager' manually
- add quirks for differently working (or not) registration options for
  the D-Bus Register*() methods depending on the version of RHEL
- 'subscription-manager register' is used only in case the signal test
  is not working; silent fallback in case of D-Bus errors during the
  registration is not done on purpose to avoid silent fallback to a less
  secure registration

[1] https://github.com/oamg/convert2rhel/pull/540/

(cherry picked from commit e939cd07ef)

Co-authored-by: Pino Toscano <ptoscano@redhat.com>
2023-03-14 23:06:41 +01:00
patchback[bot]
94efecaf67
[PR #6160/a49ad340 backport][stable-6] [make] Provide built command in the module output (#6186)
[make] Provide built command in the module output (#6160)

It may happen operator wants to get the built command instead of all the
parameters. This change injects a new entry in the dict output, showing
what command way actually launched.

This patch also takes the opportunity to add missing dots to some
documentation lines.

(cherry picked from commit a49ad340af)

Co-authored-by: Cédric Jeanneret <39397510+cjeanner@users.noreply.github.com>
2023-03-14 21:03:54 +01:00
patchback[bot]
8e84b3ef8e
[PR #6117/3862de3f backport][stable-6] Removes dependency on StormSSH (#6179)
Removes dependency on StormSSH (#6117)

* included storm config parser

* Add changelog fragment

* Fix changelog fragment

* address PR feedback

* fix license

* add required boilerplate, fix issues found in test output

* move __future__ imports

* address pr feedback

* address test output

* address pr feedback

(cherry picked from commit 3862de3f15)

Co-authored-by: Peter Upton <peterupton99@gmail.com>
2023-03-12 15:50:07 +01:00
patchback[bot]
944bc78360
[PR #6131/abcba9db backport][stable-6] Interfaces file spaces fix (#6169)
Interfaces file spaces fix (#6131)

* interfaces_file: added test case for #6120

* interfaces_file: reverted code to #fafabed

* interfaces_file: added changelog fragment

* interfaces_file: added missing licenses

* interfaces_file: improved test coverage

* interfaces_file: fixed retrieving option values

* Update plugins/modules/interfaces_file.py

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

* Update plugins/modules/interfaces_file.py

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

* Update tests/unit/plugins/modules/interfaces_file/test_interfaces_file.py

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

* Update plugins/modules/interfaces_file.py

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

* Update plugins/modules/interfaces_file.py

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

* Update plugins/modules/interfaces_file.py

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

* Update plugins/modules/interfaces_file.py

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

* Update plugins/modules/interfaces_file.py

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

* Update plugins/modules/interfaces_file.py

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

* Update tests/unit/plugins/modules/interfaces_file/test_interfaces_file.py

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

* interfaces_file: spacing fix

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit abcba9dbbe)

Co-authored-by: Roman Belyakovsky <roman.beliakovskii@smartly.io>
2023-03-09 20:31:08 +01:00
patchback[bot]
1a72aea4c5
[PR #6161/6d003ca7 backport][stable-6] [make] Improve module doc (#6163)
[make] Improve module doc (#6161)

This change reorder the parameters so that we get the mandatory one at
the top, then alphabetically order the other bellow.

It also adds the returned values.

(cherry picked from commit 6d003ca7fc)

Co-authored-by: Cédric Jeanneret <39397510+cjeanner@users.noreply.github.com>
2023-03-08 15:19:54 +01:00
patchback[bot]
36eff2fd99
[PR #6114/6cf67448 backport][stable-6] memset*.py: Fixed URLError handling (#6157)
memset*.py: Fixed URLError handling (#6114)

* memset.py: Added URLError exception and stderr to Response() object

* memset_*.py: Check response.status_code and response.stderr

* Added changelog fragment

* memset.py: Fixed pep8

* Renamed changelog fragment with .yml file extension

(cherry picked from commit 6cf674485f)

Co-authored-by: Daniel Patrick <dani.p1991@gmail.com>
2023-03-08 13:58:39 +01:00
patchback[bot]
47514e1401
[PR #6152/11c7611c backport][stable-6] More true/false normalization (#6153)
More true/false normalization (#6152)

* More true/false normalization.

* Boolean do not need explicit choices.

* One more.

* Fix type argument.

(cherry picked from commit 11c7611ced)

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-03-07 07:10:10 +01:00
patchback[bot]
186b4200f6
[PR #6049/627371e2 backport][stable-6] dconf: Check for changes properly despite style of quotes used by user (#6145)
dconf: Check for changes properly despite style of quotes used by user (#6049)

dconf: parse GVariant values to check for equality whenever possible

Direct string comparisons are an inaccurate way to compare two
GVariant representations. For example, 'foo' and "foo" (including the
quote marks, which are part of the representation) are equal GVariants
but if you just do a string compare (remember, including the quotes)
they'll be interpreted.

We therefore want to use the `gi.repository` Python library to parse
GVariant representations before comparing them whenever possible.

However, we don't want to assume that this library will always be
available or require it for Ansible to function, so we use a straight
string comparison as a fallback when the library isn't available. This
may result in some false positives, i.e., Ansible thinking a value is
changing when it actually isn't, but will not result in incorrect
values being written into `dconf`.

Co-authored-by: Jonathan Kamens <jik@jik5.kamens.us>
(cherry picked from commit 627371e2d8)

Co-authored-by: Jonathan Kamens <jik@kamens.us>
2023-03-05 11:49:43 +01:00
patchback[bot]
b12113c182
[PR #6130/c077818c backport][stable-6] Fixes #6112: community.general.gitlab_runner KeyError: 'access_level' (#6142)
Fixes #6112: community.general.gitlab_runner KeyError: 'access_level' (#6130)

The fix ensures that no 'KeyError' is raised, when 'access_level' is not provided as module parameter or when 'access_level_on_creation' is false.

Signed-off-by: Christoph Fiehe <c.fiehe@eurodata.de>
Co-authored-by: Christoph Fiehe <c.fiehe@eurodata.de>
(cherry picked from commit c077818c5d)

Co-authored-by: cfiehe <cfiehe@users.noreply.github.com>
2023-03-04 10:38:59 +01:00
patchback[bot]
4860c20108
[PR #6104/2dee3464 backport][stable-6] nmcli: fixed inability to change mtu on vlan connection (#6140)
nmcli: fixed inability to change mtu on vlan connection (#6104)

* tests updated

Co-authored-by: Sam Potekhin <heaveaxy@gmail.com>
(cherry picked from commit 2dee3464dd)

Co-authored-by: Sam Potekhin <24751685+heaveaxy@users.noreply.github.com>
2023-03-04 10:21:59 +01:00
patchback[bot]
8efbd8172c
[PR #6138/3d67f518 backport][stable-6] Fix Yarn global not working without explicit executable path (#6141)
Fix Yarn global not working without explicit executable path (#6138)

* Fix Yarn global not working without explicit executable path

* changelog fragment

* fix formatting and add test

* oops

(cherry picked from commit 3d67f51824)

Co-authored-by: Sargun Vohra <sargun.vohra@gmail.com>
2023-03-04 10:21:50 +01:00
patchback[bot]
8c1b7e3ddb
[PR #6118/9a97bc7c backport][stable-6] Add 'inventory_hostname' to the jail plugin documentation (#6137)
Add 'inventory_hostname' to the jail plugin documentation (#6118)

This fixes the following warning on FreeBSD:

  [WARNING]: The "jail" connection plugin has an improperly configured
  remote target value, forcing "inventory_hostname" templated value
  instead of the string

(cherry picked from commit 9a97bc7c11)

Co-authored-by: Giacomo Olgeni <olgeni@olgeni.com>
2023-03-03 23:10:59 +01:00
patchback[bot]
ec228bf32f
[PR #6121/c0cb7958 backport][stable-6] Documentation: yum_versionlock typo fix (#6126)
Documentation: yum_versionlock typo fix (#6121)

##### SUMMARY
Fixing typo in documentation, we need to use name parameter instead of package.

##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr

(cherry picked from commit c0cb7958cb)

Co-authored-by: AnatomicJC <github@open-web.fr>
2023-03-02 20:16:13 +01:00
patchback[bot]
1d39bbefd9
[PR #6119/345a6930 backport][stable-6] opkg: fix bug when update_cache=true (#6124)
opkg: fix bug when update_cache=true (#6119)

* opkg: fix bug when update_cache=true

* add changelog fragment

(cherry picked from commit 345a69304a)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2023-03-02 07:15:28 +01:00
patchback[bot]
c3db6343e5
[PR #6109/d2094669 backport][stable-6] add xorder_discovery parameter (#6110)
add xorder_discovery parameter (#6109)

* add xorder_discovery parameter

* fix regex raw string

* use dn logic from LdapGeneric

* Update documentation.

* Update changelog fragment.

* Improve if.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit d209466985)

Co-authored-by: Reto Kupferschmid <kupferschmid@puzzle.ch>
2023-02-27 20:39:31 +01:00
patchback[bot]
90a1743acf
[PR #6100/e8bdec27 backport][stable-6] jenkins_plugin: avoid undefined variable when updates file is not downloaded (#6103)
jenkins_plugin: avoid undefined variable when updates file is not downloaded (#6100)

Avoid undefined variable when updates file is not downloaded.

(cherry picked from commit e8bdec2733)

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-02-26 15:52:53 +01:00
patchback[bot]
eb6ef5ae2e
[PR #5424/29f50337 backport][stable-6] add persistent option for modprobe (#6102)
add persistent option for modprobe (#5424)

* add persistent option for modprobe

* add suggested changes + fix broken test

* change modprobe module path in tests due to rebase

* change persistent option type from bool to str with choices

* fix unused import

* add example with persistent option

* fix some minor issues after review

- move regexps compiling to __init__
- move AnsibleModule to build_module function and use this function in tests instead of AnsibleModule
- fix terminlogy issue in documentation

* fix unused-import

(cherry picked from commit 29f5033737)

Co-authored-by: Alex Groshev <38885591+haddystuff@users.noreply.github.com>
2023-02-26 15:37:09 +01:00
patchback[bot]
89dd500159
[PR #5986/617be6e1 backport][stable-6] Add new project features to API (#6099)
Add new project features to API (#5986)

* Add new project features to API

* add changelog fragment

* remove extra line from changelog

* Update changelog formatting

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 617be6e124)

Co-authored-by: Hemant Zope <42613258+zhemant@users.noreply.github.com>
2023-02-26 14:29:54 +01:00
patchback[bot]
9bab144d06
[PR #5830/c8a2ac3a backport][stable-6] sefcontext: add support for path substitutions (#6098)
sefcontext: add support for path substitutions (#5830)

* sefcontext: add path substitution support (#1193)

First commit for feedback, missing docs and tests.

* sefcontext: add documentation

* Add changelog fragment

* Documentation formatting

* Delete extra newline

* pep8 fixes

Fix indentation

* Add version_added to arg docs

* Add examples

* Don't delete non-matching path substitutions

* Add integration tests

* Delete only substitutions if such arg passed

Don't delete existing regular file context mappings if deletion of
a path substitution was requested with the presence of the
`equal` arg - delete only path substitutions in such case.

Path substitutions and regular mappings may overlap.

* Can only add args in minor releases

:(

* Cleanup before tests

* Fix deletion using substitution

Was comparing wrong var.

* Fix test checking wrong var

* Improve args documentation and examples

List the default values for selevel, seuser.
Add example for deleting path substitutions only.

* Add attributes documentation block

Not sure if should add become/delegate/async,
shouldn't those work just like that without any
specific code added for them?

* and fix indentation on attribute block

* Consistent indentation for attributes

Confusing, most plugins indent with 4 spaces.
But some use 2 like the rest of the code, so use 2.

* Add missing ref for attribute block

* Use correct c.g version in doc block

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

* Add full stop to changelog fragment

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

* Streamline documentation

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* Support limiting deletion to setype

Deleting file context mappings may be limited by
passing setype or equal, if neither arg is passed
then delete either setype/equal mappings that match.

* Change arg name, diff mode output fix

Change arg name from equal to substitute.
Print target = subsitute in diff mode same way as
semanage does.

Also put back platform attribute, try to improve
clumsy language in the substitute arg docs.

* Delete even if arg setype not match existing

Test 5 indicates that deletion is supposed to not check that
the arg setype passed when deleting matches the setype
of the mapping to delete.
Delete any mapping that matches target, regardless of
setype arg value.

* Update arg name in tests

* Too eager replacing

Accidentally replaced seobject function names so fix them back

* 4564: Fix invalid setype in doc example

Change from httpd_git_rw_content_t which
does not exist to httpd_sys_rw_content_t

Fixes #4564

* Fix documentation attributes

Additional fragment

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

* Update version_added in docs

Bumping minor to 6.4.0 since it didn't make 6.3.0.

* Add more description to the new arg docs

Try to improve discoverability of the new feature and make it easier to understand without deep SELinux understanding.

* Update platform to Linux in documentation

* Add equal as alias for the new argument

Improve discoverability of the new feature by adding an alias to the new module argument. The argument name "equal" will be easy to find for users who are not familiar with SELinux and who just try to match to the CLI tool `semanage`.

* And add alias argument properly

Previous commit missed actually adding the alias (added to docs only).

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
(cherry picked from commit c8a2ac3a47)

Co-authored-by: bluikko <14869000+bluikko@users.noreply.github.com>
2023-02-26 14:23:53 +01:00