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

920 commits

Author SHA1 Message Date
patchback[bot]
afd2151672
[PR #5732/0ca41ded backport][stable-6] Bugfix/keycloak userfed idempotency (#5874)
Bugfix/keycloak userfed idempotency (#5732)

* fix(modules/keycloak_user_federation): fixes ...

... federation read call not finding already existing federations
properly because of bad parametrisation

* fix(modules/keycloak_user_federation): added ...

... new integration test for module idempotency bugfix

* added changelog fragment for pr

Co-authored-by: Mirko Wilhelmi <Mirko.Wilhelmi@sma.de>
(cherry picked from commit 0ca41dedce)

Co-authored-by: morco <thegreatwiper@web.de>
2023-01-22 17:44:42 +01:00
patchback[bot]
ea9b272043
[PR #5754/59a9d342 backport][stable-6] Remote management modules for OCAPI-based devices. (#5869)
Remote management modules for OCAPI-based devices. (#5754)

* Remote management modules for OCAPI-based devices.

    Open Composable API (OCAPI) is a REST-based API designed for data center composability. For more information, see https://www.opencompute.org/documents/open-composable-api-for-ocp-2019-06-24-pdf

    This PR introduces ocapi_command and ocapi_info modules.  These are based on the existing redfish_command and redfish_info modules and follow similar patterns.  This initial implementation includes support for the folowing operations:

    - Indicator LED toggling
    - Power state toggling
    - Enclosure reset (reboot)
    - Firmware upload
    - Firmware update
    - Firmware activate
    - Job deletion
    - Job status

    These modules have been tested against Western Digital OpenFlex(tm) Data24 storage enclosures. API reference is at https://documents.westerndigital.com/content/dam/doc-library/en_us/assets/public/western-digital/product/platforms/openflex/reference-architecture-open-composable-api.pdf

* Fix licensing issue for ocapi_utils.py

* PR Feedback

* Apply suggestions from code review

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

* Update plugins/module_utils/ocapi_utils.py

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

* Update plugins/modules/ocapi_info.py

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

* Apply suggestions from code review

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

* PR Feedback

Use six module for urlparse

* Apply suggestions from code review

Documentation fixes.

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

* Fix sanity test line too long error.

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

Co-authored-by: Mike Moerk <michael.moerk@wdc.com>
2023-01-22 17:23:28 +01:00
patchback[bot]
1ade62c5bc
[PR #5845/1430ed00 backport][stable-6] pipx: add testcase w/ env vars PIPX_xxxx (#5859)
pipx: add testcase w/ env vars PIPX_xxxx (#5845)

* pipx: add testcase w/ env vars PIPX_xxxx

* add note to the docs about env vars

* add note to the docs about env vars

* Apply suggestions from code review

* Update plugins/modules/pipx.py

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

* Update plugins/modules/pipx_info.py

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

* break long lines into smaller ones

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

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2023-01-18 21:43:16 +01:00
patchback[bot]
811c4a304a
[PR #5793/756c0776 backport][stable-6] apache2_module generates false/misleading warning (#5841)
apache2_module generates false/misleading warning (#5793)

* Add parameter warn_mpm_module to control when warning are raised

* Remoe whitespace

* Add changelog fragment

* Add missing license

* Update changelogs/fragments/5793-apache2-module-npm-warnings.yml

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

* Update plugins/modules/apache2_module.py

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

* Update plugins/modules/apache2_module.py

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

* Update tests/integration/targets/apache2_module/tasks/635-apache2-misleading-warning.yml

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

* Refining integration test - previous was invalid

* False to false

* refactor assertion for suse

* Revert "refactor assertion for suse"

This reverts commit 61b86e7493.

* Excluding test on Suse

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

Co-authored-by: Cédric Servais <cedric.servais@outlook.com>
2023-01-14 19:04:17 +01:00
patchback[bot]
c0fde76b79
[PR #5808/6ec04973 backport][stable-6] xml children module parameter does not exist (#5839)
xml children module parameter does not exist (#5808)

* Add changelog

* Add integration tests

* Rename children to set_children

* Add PR information

* Update changelogs/fragments/5808-xml-children-parameter-does-not-exist.yml

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

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

Co-authored-by: Cédric Servais <cedric.servais@outlook.com>
2023-01-14 18:40:20 +01:00
patchback[bot]
82a9db9738
[PR #5718/682bb4b8 backport][stable-6] opkg: refactor module to use StateModuleHelper and CmdRunner (#5824)
opkg: refactor module to use StateModuleHelper and CmdRunner (#5718)

* opkg: refactor module to use StateModuleHelper and CmdRunner

* add changelog fragment

* Update plugins/modules/opkg.py

Co-authored-by: joergho <48011876+joergho@users.noreply.github.com>

* Update plugins/modules/opkg.py

Co-authored-by: joergho <48011876+joergho@users.noreply.github.com>

* Update plugins/modules/opkg.py

Co-authored-by: joergho <48011876+joergho@users.noreply.github.com>

* Update plugins/modules/opkg.py

Co-authored-by: joergho <48011876+joergho@users.noreply.github.com>

* Update plugins/modules/opkg.py

Co-authored-by: joergho <48011876+joergho@users.noreply.github.com>

* Update plugins/modules/opkg.py

Co-authored-by: joergho <48011876+joergho@users.noreply.github.com>

* Update plugins/modules/opkg.py

Co-authored-by: joergho <48011876+joergho@users.noreply.github.com>

* generate message outcome as before

* aggregated changes from 5688

* fix package query

* add unit tests

* fix sanity error

* Update plugins/modules/opkg.py

Co-authored-by: joergho <48011876+joergho@users.noreply.github.com>

* add test for specifying version

* refactor parameter name

Co-authored-by: joergho <48011876+joergho@users.noreply.github.com>
(cherry picked from commit 682bb4b88a)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2023-01-12 21:06:11 +01:00
patchback[bot]
efc2cbf840
[PR #5782/6fb212b1 backport][stable-6] Update CI matrix (#5798)
Update CI matrix (#5782)

* Update CI matrix.

* Disable RHEL 9.1 for tests where RHEL 9.0 was disabled as well.

* Skip iso_extract on FreeBSD 12.4.

* Fix cloud_init_data_facts test for Fedora 37.

* Do not try to install snap on RHEL 9.1.

* Skip pkgng jail tests on FreeBSD 12.4 as well.

(cherry picked from commit 6fb212b104)

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-01-07 18:17:12 +01:00
patchback[bot]
a1ca89b058
[PR #5786/759ca9a0 backport][stable-6] Remove currently unneeded generic tests from CI (#5791)
Remove currently unneeded generic tests from CI (#5786)

Remove currently unneeded generic tests from CI.

(cherry picked from commit 759ca9a0ab)

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-01-07 15:24:47 +01:00
patchback[bot]
dd70419d18
[PR #5785/0ff003d3 backport][stable-6] Fix CI (#5789)
Fix CI (#5785)

Try to fix CI.

(cherry picked from commit 0ff003d312)

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-01-07 15:20:24 +01:00
patchback[bot]
8bc5494ad5
[PR #5765/dc531b18 backport][stable-6] ModuleHelper - lax handling of conflicting output (#5775)
ModuleHelper - lax handling of conflicting output (#5765)

* ModuleHelper - lax handling of conflicting output

* add changelog fragment

* only create _var when really needed

* adjust changelog

* Update changelogs/fragments/5765-mh-lax-output-conflict.yml

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

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

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2023-01-07 10:52:56 +01:00
patchback[bot]
2d450a5a36
[PR #5725/4dc897d5 backport][stable-6] redhat_subscription: Add support for Red Hat API token (#5768)
redhat_subscription: Add support for Red Hat API token (#5725)

Add support for Red Hat API token

fix mixed up

fix version

(cherry picked from commit 4dc897d559)

Co-authored-by: Eric C Chong <ecchong@gmail.com>
2023-01-05 21:51:21 +01:00
patchback[bot]
c355f93d62
[PR #5755/b49bf081 backport][stable-6] ModuleHelper - fix bug when adjusting conflicting output (#5758)
ModuleHelper - fix bug when adjusting conflicting output (#5755)

* ModuleHelper - fix bug when adjusting conflicting output

* add changelog fragment

* remove commented test code

(cherry picked from commit b49bf081f8)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2023-01-04 21:40:56 +01:00
patchback[bot]
5fcf5d0c8b
[PR #5720/6383c823 backport][stable-6] ssh_config: fixed sanity (#5726)
ssh_config: fixed sanity (#5720)

* ssh_config: fix sanity checks

* fixed mod utils and removed sanity ignores

* update BOTMETA

* add changelog fragment

* Update plugins/module_utils/ssh.py

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

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

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-12-23 06:41:39 +01:00
patchback[bot]
95f3109ddc
[PR #5721/28969c61 backport][stable-6] manageiq_policies: deprecate list state (#5723)
manageiq_policies: deprecate list state (#5721)

* manageiq_policies: deprecate list state

* add changelog fragment

(cherry picked from commit 28969c61ad)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-12-22 07:11:24 +01:00
patchback[bot]
6037c5d1e6
[PR #5680/488e828f backport][stable-6] ansible_galaxy_install: use locale C tentatively, else en_US (#5722)
ansible_galaxy_install: use locale C tentatively, else en_US (#5680)

* ansible_galaxy_install: use locale C tentatively, else en_US

* use custom exception to signal unsupported locale

* add step to remove artefacts at the end of the test

* add step to remove artefacts at the beginning of the test

* comment out context controller

* trying with temporary dir as destination

* remove collection before test with reqs file

* ensure collections are installed in temp dir in tests + check_force

* simplified the change

* added extra condition for failing locale

* improved exception handling

* add changelog fragment

(cherry picked from commit 488e828f9b)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-12-22 06:00:34 +00:00
patchback[bot]
a70d9773dd
[PR #5713/1f492414 backport][stable-6] CI: add extra VMs for certain tests (#5717)
CI: add extra VMs for certain tests (#5713)

* Remove superfluous VM.

* Add extra VM group.

* More platforms, add scripts.

* [REVERT THIS] Shrink matrix to only the tests we are interested in.

* Fix some tests.

* Skip snap tests on Ubuntu VMs for now.

* Skip xfs_quota tests on Alpine VMs due to ansible.posix.mount failing.

* Revert "[REVERT THIS] Shrink matrix to only the tests we are interested in."

This reverts commit 2e98e163db.

* Stick to Alpine and Ubuntu 22.04 for now.

(cherry picked from commit 1f49241481)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-12-21 08:13:06 +01:00
patchback[bot]
bc50b48205
[PR #5703/77fde030 backport][stable-6] Add support for host restriction in sudoers module (#5716)
Add support for host restriction in sudoers module (#5703)

* Add support to restrict privileges by host

* Missing comma

* Making linter happy.

* Add version 6.2.0 as when sudoers host parameter added

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

* Changelog fragment for PR #5703

* Test for sudoers host-based restriction

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

Co-authored-by: Laurence <laurence+github@entek.org.uk>
2022-12-20 12:59:26 +01:00
patchback[bot]
1489c080a7
[PR #5612/f95e0d77 backport][stable-6] puppet: refactored to use CmdRunner (#5686)
puppet: refactored to use CmdRunner (#5612)

* puppet: refactored to use CmdRunner

* add changelog fragment

* add more tests

(cherry picked from commit f95e0d775d)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-12-14 22:03:40 +01:00
patchback[bot]
ff21afb227
[PR #5662/471f523f backport][stable-6] redhat_subscription: add server_proxy_scheme parameter (#5671)
redhat_subscription: add `server_proxy_scheme` parameter (#5662)

Add the `server_proxy_scheme` parameter to configure the scheme used for
the proxy server. This completes the configuration parameters for the
proxy server.

(cherry picked from commit 471f523f53)

Co-authored-by: Pino Toscano <ptoscano@redhat.com>
2022-12-08 22:54:18 +01:00
patchback[bot]
c1d6e5c3c2
[PR #5668/50021d6b backport][stable-6] Fix pipx_info tests (#5670)
Fix pipx_info tests (#5668)

Update dependencies.

(cherry picked from commit 50021d6bfb)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-12-08 22:25:12 +01:00
patchback[bot]
8a231e4b36
[PR #5606/7ea544a6 backport][stable-6] New Module: Keycloak ClientSecret with PR changes (#5654)
New Module: Keycloak ClientSecret with PR changes (#5606)

* feat(plugins/keycloak): add get and create util function for client secret

* feat(plugins/keycloak): add client secret module

* chore: add maintainer in BOTMETA

* Update plugins/modules/identity/keycloak/keycloak_clientsecret.py

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

* Make changes to keycloak_clientsecret from PR

* Add SPDX identifier for keycloak_clientsecret

* Add copyright in keycloak_clientsecret for REUSE

* Add integration test for keycloak_clientsecret

* rm clientsecret from keycloak_clientsecret result

  - end_state used instead

* keycloak_clientsecret: Undo meta/runtime.yml change

* Fix sanity tests for keycloak_clientsecret

* New keycloak_clientsecret_info module

  - Replaces keycloak_clientsecret
  - Module definition and some common logic moved into module_utils
  - Update documentation, tests, etc.
  - Add myself as author

* Misc fixes to keycloak_clientsecret_info

* Add keycloak_clientsecret_regenerate module

* keycloak_clientsecret* Update .github/BOTMETA.yml

* keycloak_clientsecret_regenerate: Fix sanity tests

* Fix README for keycloak_clientsecret integration test

* Separate out keycloak_clientsecret module_utils

* Keycloak_clientsecret module_utils: boilerplate

* Update plugins/modules/keycloak_clientsecret_info.py

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

* Update plugins/modules/keycloak_clientsecret_info.py

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

* Update plugins/modules/keycloak_clientsecret_info.py

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

* Update plugins/modules/keycloak_clientsecret_info.py

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

* Update plugins/modules/keycloak_clientsecret_info.py

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

* Update plugins/modules/keycloak_clientsecret_info.py

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

* keycloak_clientsecret: Add no_log to examples and docs

* keycloak_clientsecret: Update BOTMETA

* Update .github/BOTMETA.yml

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

Co-authored-by: fynncfchen <fynn.cfchen@gmail.com>
Co-authored-by: Fynnnnn <ethan.cfchen@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 7ea544a624)

Co-authored-by: John Cant <a.johncant@gmail.com>
2022-12-05 05:47:23 +00:00
patchback[bot]
51d704bfe3
[PR #5605/fb2833d3 backport][stable-6] feat(ssh_config): host_key_algorithms option (#5653)
feat(ssh_config): host_key_algorithms option (#5605)

* feat(ssh_config): host_key_algorithms option

* chore: add changelog fragment

* chore(ssh_config): add version info to option and update fragment

(cherry picked from commit fb2833d34d)

Co-authored-by: Arek Kalandyk <36413794+koralowiec@users.noreply.github.com>
2022-12-04 13:10:32 +01:00
patchback[bot]
cc28cde3a2
[PR #5647/be22ca06 backport][stable-6] cmd_runner: allow bool format to pass alternate (false) value (#5650)
cmd_runner: allow bool format to pass alternate (false) value (#5647)

* allow bool format to pass alternate (false) value

* add changelog fragment

(cherry picked from commit be22ca0633)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-12-04 12:39:30 +01:00
patchback[bot]
2d616bf4d1
[PR #5638/23aacc78 backport][stable-6] Reenable and enhance copr integration tests (#5646)
Reenable and enhance `copr` integration tests (#5638)

* Enhance `copr` integration tests

- Switch to a new test Copr repository. @copr/integration_tests was
  removed which caused the tests to fail. I created a new one under my
  account that I'll ensure stays around.
- Add basic testing to ensure that repo files are created in the correct
  location and contain the correct baseurl and enabled status.
- Also run tests on Enterprise Linux.
- Test that packages from the Copr install. This has to be disabled on
  EOL Fedoras that Copr does not allow building new packages for.

Resolves: https://github.com/ansible-collections/community.general/issues/5595

* copr tests: Fix ansible_python_interpreter on c8s

* copr: Don't test on alt Pythons on cs8

* Revert "copr tests: Fix ansible_python_interpreter on c8s"

This reverts commit 58e15a7ebf.

(cherry picked from commit 23aacc78e1)

Co-authored-by: Maxwell G <gotmax@e.email>
2022-12-03 22:40:55 +01:00
patchback[bot]
efedd0d6e2
redhat_subscription: drop unneeded args to Rhsm.register() (#5583) (#5626)
Stop passing all the "rhsm_", and "server_" module arguments to
"Rhsm.register()", and thus as arguments for
"subscription-manager register":
- right before calling "Rhsm.register()", "Rhsm.configure()" is called
  to configure subscription-manager with all the "rhsm_", and "server_"
  arguments; hence, they are already configured
- the passed argument to "--serverurl" is partially wrong:
  "Rhsm.register()" passes only the hostname, whereas the other bits
  (port and prefix) are supported too; this "works" because port and
  prefix were already configured previously, and the lax parsing that
  subscription-manager does allows for missing bits
- the parsing done by subscription-manager for "--baseurl" strips out
  the URL scheme and always uses https: this means that specifying
  "rhsm_baseurl: http://server" as module parameter will be taken as
  "https://server" by subscription-manager; since "rhsm_baseurl" is
  already configured by "Rhsm.configure()", this issue is gone

(cherry picked from commit 101c957631)

Co-authored-by: Pino Toscano <ptoscano@redhat.com>
2022-11-29 13:20:30 +01:00
patchback[bot]
d930c8d877
udm_share: fix sanity checks (#5557) (#5609)
* udm_share: fix sanity checks

* add changelog fragment

(cherry picked from commit a3b748a15e)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-11-26 18:58:09 +01:00
patchback[bot]
4b7554445b
Temporarily disable copr tests. (#5594) (#5598)
(cherry picked from commit 11e1423f60)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-11-23 20:34:31 +01:00
patchback[bot]
3a456a645d
udm_user: sanity (#5559) (#5593)
* fix parameter email

* fix parameter groups

* fix parameters home_telephone_number, mail_alternative_address, mobile_telephone_number, pager_telephonenumber

* fix parameter phone

* fix parameter samba_privileges

* fix parameter samba_user_workstations

* fix parameter secretary

* fix parameter serviceprovider

* remove lines from ignore files

* add changelog fragment

(cherry picked from commit 79929830c4)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-11-23 18:58:37 +01:00
patchback[bot]
8d83557e52
[GitLab] Add modules to manager project badges (#5534) (#5584)
* [GitLab] Add modules to manager project badges

Signed-off-by: Lunik <lunik@tiwabbit.fr>

* first review

Signed-off-by: Lunik <lunik@tiwabbit.fr>

* Update plugins/modules/gitlab_project_badge.py

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

Signed-off-by: Lunik <lunik@tiwabbit.fr>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit c7481c5c96)

Co-authored-by: Guillaume MARTINEZ <lunik@tiwabbit.fr>
2022-11-23 07:38:08 +01:00
patchback[bot]
17447d2a84
jenkins_plugin: fix sanity checks (#5565) (#5575)
* jenkins_plugin: fix sanity checks

* update BOTMETA

* add changelog fragment

* fix copyright

* Update plugins/module_utils/jenkins.py

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

* Update plugins/module_utils/jenkins.py

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

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

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-11-23 07:37:52 +01:00
patchback[bot]
38b4e316ae
lxd_project: refactored os.path.expanduser() to module utils (#5549) (#5552)
* lxd_project: refactored os.path.expanduser() to module utils

* add changelog fragment

(cherry picked from commit 9874462abb)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-11-23 07:37:36 +01:00
patchback[bot]
b52a6f3611
gconftool2: refactored to use ModuleHelper + CmdRunner (#5545) (#5551)
* gconftool2: refactored to use ModuleHelper + CmdRunner

* add changelog fragment

* removed old code commented out

(cherry picked from commit 6c7e9116e1)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-11-23 07:37:27 +01:00
patchback[bot]
2435fb3f30
rax_scaling_group: fix sanity check (#5563) (#5569)
* rax_scaling_group: fix sanity check

* add changelog fragment

* added missing call to expanduser()

(cherry picked from commit 6a03108609)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-11-23 07:37:12 +01:00
patchback[bot]
4b04e3cc32
scaleway_organization_info: sanity checks (#5571) (#5577)
* scaleway_organization_info: fix sanity checks

* remove lines from ignore files

* Update plugins/modules/scaleway_organization_info.py

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

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

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-11-17 07:29:49 +01:00
patchback[bot]
c681249364
cmd_runner module utils: fix case for as_fixed() format (#5538) (#5562)
* cmd_runner module utils: fix case for as_fixed() format

* add changelog fragment

* simplified test_cmd_runner

* fix handling empty default for `as_map()`

* add changelog fragment

* MissingArgumentValue is reraised in run()

(cherry picked from commit e87ca10b61)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-11-16 06:58:30 +01:00
patchback[bot]
57a4195b0d
redhat_subscription: fix sanity check (#5555) (#5560)
* redhat_subscription: fix sanity check

* removed ignore lines

(cherry picked from commit 801e3d86ef)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-11-16 06:57:38 +01:00
patchback[bot]
41a23f093d
spotinst_aws_elasticgroup: sanity checks (#5553) (#5554)
* spotinst_aws_elastigroup: add elements to parameter do_not_update

* spotinst_aws_elastigroup: add docs for parameter token

* add missing docs

* add changelog fragment

* Update plugins/modules/spotinst_aws_elastigroup.py

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

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

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-11-16 05:35:56 +00:00
patchback[bot]
fef6abc8c8
Fix a logical flaw when deleting a build in the jenkins_build module (#5514) (#5531)
* Fix the logical flaw when deleting a build in the jenkins_build module.

* Fix the logical flaw when deleting a Jenkins build in the jenkins_build module.

* Adding changelogs.

* Update tests/unit/plugins/modules/test_jenkins_build.py

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

* Attempt to mock the exception classes.

* Remedy the CI issues when mocking the exception classes.

* Assuming a way to mock the get_build_status function.

* Near to the feasible approach.

* Calls the correct class when unit testing.

* Fix sending wrong arguments when unit testing.

* Directly assign the argument value in the unit testing.

* Fix errors calling different classes.

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

Co-authored-by: Tong He <68936428+unnecessary-username@users.noreply.github.com>
2022-11-13 17:36:34 +01:00
patchback[bot]
e96bfd07b4
Actually sort the fixtures (#5510) (#5517)
* Actually sort the fixtures

I removed my more complicated fix but failed to actually put the sorted() call
back in.

* Sort by class name

(cherry picked from commit eae33c20f6)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2022-11-09 07:32:56 +01:00
Guillaume MARTINEZ
4fed0e13db
[Scaleway] Add module to manage containers (#5496)
Signed-off-by: Lunik <lunik@tiwabbit.fr>

Signed-off-by: Lunik <lunik@tiwabbit.fr>
2022-11-07 21:04:55 +01:00
Alexei Znamensky
b696aa72b2
cpanm: using CmdRunner (#5485)
* cpanm: using CmdRunner

* add changelog fragment
2022-11-07 20:15:00 +01:00
Alexei Znamensky
8fb2228125
snap: fix regex to support option values with whitespaces (#5475)
* snap: fix regex to support option values with whitespaces

* add changelog fragment
2022-11-06 11:41:11 +01:00
Alexei Znamensky
fc817601bc
django_manage: add extra tests (#5476) 2022-11-06 11:38:38 +01:00
Sam Doran
be0b5e5f8c
onepassword - Support v2 (#4728)
* Begin building out separate classes to support  different op cli versions

Create separet base classes for each major version.
Define the main interface in the base class.
Create methods for getting the current version and instantiating the
appropriate class based on the found version.

* First pass at mostly working CLI version classes

* Correct mismathched parameters

* Update _run() method to allow updating enviroment

This allows passing in the app secret as an env var, which is more
secure than using a command line arg.

* Continuing to improve the interface

* Tear existing tests down to the studs

These tests were based off of the LastPass unit tests. I’m going to
just start from scratch given the new plugin code is vastly diffenent.

* Fix sanity test

* CLI config file path can be None

* Improve required param checking

- only report missing params
- use proper grammer based on number of missing params

* Change assert_logged_in() method return value

Return a boolean value indicating whether or not account is signed in

* Improve full login for v2

Have to do a bit of a dance to avoid hitting the interactive prompt
if there are no accounts configured.

* Remove unused methods

* Add some tests

* Fix linting errors

* Move fixtures to separate file

* Restructure mock test data and add more tests

* Add boilerplate

* Add test scenario for op v2 and increase coverage

* Fix up copyright statements

* Test v1 and v2 in all cases

* Use a more descriptive variable name

* Use docstrings rather than pass in abstract class

This adds coverage to abstract methods with the least amount of hackery.

* Increase test coverage for CLI classes

* Sort test parameters to avoid collection errors

* Update version tested in docs

* Revere test parameter sorting for now

The parameters need to be sorted to avoid the issue in older Python
versions in CI, but I’m having trouble working out how to do that
currently.

* Allow passing kwargs to the lookup module under test

* Favor label over id for v2 when looking for values

Add tests

* Display a warning for section on op v2 or greater

There is no “value” in section fields. If we wanted to support sections
in v2, we would also have to allow specifying the field name in
order to override “value”.

* Move test cases to their own file

Getting a bit unwieldy having it in the test file

* Move output into JSON files fore easier reuse

* Switch to using get_options()

* Add licenses for fixture files

* Use get_option() since get_options() was added in Ansible Core 2.12

* Rearrange fixtures

* Add changelog

* Move common classes to module_utils

* Move common classes back to lookup

The plugin relies on AnsibleLookupError() quite a bit which is not available
in module code.

Remove use of display for errors since section isn’t actually deprecated.

* Properly handle sections

Still room for improvement, but this is at least a start.

* Remove some comments that won’t be addressed

* Make test gathering more deterministic to avoid failures

* Update changelog fragment

* Simple fix for making tests reliable
2022-11-06 11:32:35 +01:00
Guillaume MARTINEZ
1e17ec13b8
[Scaleway] Add module to manage container namespaces (#5416)
* [Scaleway] Add module to manage container namespaces

Signed-off-by: Lunik <lunik@tiwabbit.fr>

* Fix CI

Signed-off-by: Lunik <lunik@tiwabbit.fr>

* fix botmeta

Signed-off-by: Lunik <lunik@tiwabbit.fr>

* fix typo in loop var name

Signed-off-by: Lunik <lunik@tiwabbit.fr>

* Add missing required lib check

Signed-off-by: Lunik <lunik@tiwabbit.fr>

* fix integration tests assertions

Signed-off-by: Lunik <lunik@tiwabbit.fr>

Signed-off-by: Lunik <lunik@tiwabbit.fr>
2022-11-05 20:44:33 +00:00
Guillaume MARTINEZ
db7e5f12f5
[Scaleway] Add module to manage functions (#5463)
* [Scaleway] Add module to manage function

Signed-off-by: Lunik <lunik@tiwabbit.fr>

* fix integration tests assertions

Signed-off-by: Lunik <lunik@tiwabbit.fr>

* Update plugins/modules/scaleway_function.py

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

Signed-off-by: Lunik <lunik@tiwabbit.fr>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-11-05 20:43:47 +00:00
Alexei Znamensky
8dc82b1890
sorted content of sanity/ignore-*.txt files (#5473) 2022-11-05 11:35:39 +01:00
Guillaume MARTINEZ
c181f2dd08
[Scaleway] Fix function namespace integration tests assertions (#5464)
Signed-off-by: Lunik <lunik@tiwabbit.fr>

Signed-off-by: Lunik <lunik@tiwabbit.fr>
2022-11-03 06:45:37 +01:00
Felix Fontein
b531ecdc9b
Unflatmap community.general (#5461)
* Move files.

* Update imports and references.

* Move wrongly placed files.

* Reverse redirects, deprecate long → short name redirects.

* Simplify contribution guidelines for new modules.

* Rewrite BOTMETA.

* Add changelog fragment.

* Fix ignore.txt files.
2022-11-02 20:42:29 +00:00
Felix Fontein
faf4ec7fa6
passwordstore lookup: allow to pass options as lookup options (#5444)
* Allow to pass options as lookup options.

* Adjust tests.
2022-11-02 20:17:08 +01:00