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

1356 commits

Author SHA1 Message Date
Alexei Znamensky
a35b2eda4c
iptables_state: minor pythonisms (#5844)
* iptables_state: minor pythonisms

* add changelog fragment

* fix typo
2023-01-18 08:05:31 +01:00
Bhavya
b92542dea2
Minor changes to HPE iLO collection (#5804)
* Minor changes to setting IPs of servers

* Lint fix

* Added change log

* Update changelogs/fragments/5804-minor-changes-to-hpe-ilo-collection.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-01-18 07:59:13 +01:00
n0p90
5ad703ac64
nsupdate: fix zone lookup (#5818)
The SOA record for an existing zone is returned as an answer RR and not
as an authority RR. It can be returned as an authority RR for subdomains
of a zone.

$ dig -t SOA example.com
;; ANSWER SECTION:
example.com.	3530	IN	SOA	ns.icann.org. noc.dns.icann.org. 2022091184 7200 3600 1209600 3600

$ dig -t SOA www.example.com
;; AUTHORITY SECTION:
example.com.	3600	IN	SOA	ns.icann.org. noc.dns.icann.org. 2022091184 7200 3600 1209600 3600
2023-01-17 21:03:38 +01:00
Kristian Heljas
44172ddaa6
Add -no-color argument to terraform validation (#5843) 2023-01-16 22:54:07 +01:00
Alexei Znamensky
f05f8bb49a
rax modules: deprecation (#5752)
* rax modules: deprecation

* add changelog fragment

* Update plugins/doc_fragments/rackspace.py

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

* add comment go sanity ignore files

* changelog: fix typo + add rax module utils

* add module utils and doc fragment to runtime.yml

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-01-14 18:39:05 +01:00
Cédric Servais
756c0776d6
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>
2023-01-14 18:37:33 +01:00
Cédric Servais
6ec049734e
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>
2023-01-14 18:22:00 +01:00
Alexei Znamensky
cc79c24c01
consul: deprecate params incompatible with state=absent (#5772)
* consul: deprecate params incompatible with state=absent

* Refrain from handling SystemExit exception

* preposition

* add changelog fragment

* Update plugins/modules/consul.py

* Update changelogs/fragments/5772-consul-deprecate-params-when-absent.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-01-13 20:47:56 +01:00
Juan Antonio Valiño García
58eb495797
Fixes #5691. Support gitlab forking_access_level, builds_access_level and container_registry_access_level fields (#5706)
* Fixes #5691. Support gitlab forking_access_level, builds_access_level and container_registry_access_level fields

* Add changelog fragment

* Fix revision issues
2023-01-12 21:06:52 +01:00
Alexei Znamensky
682bb4b88a
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>
2023-01-12 20:42:38 +01:00
Alexei Znamensky
4caa6574de
snap_alias: using CmdRunner (#5486)
* snap_alias: using CmdRunner

* add changelog fragment

* fix changelog fragment

* invert order of initialization in __init_module__()

* comment extra changed=True from code

* add extra info when verbose

* add extra info when verbose - fix blank line

* handle check_mode the old way

* fix logical test

* fix error when using multiple aliases

* fix error when using multiple aliases, part 2

* revert to using check_mode_skip=True again
2023-01-08 21:37:29 +01:00
Felix Fontein
3b73e7ed2a
alternatives: make work with Fedora 37 (#5794)
* alternatives in Fedora 37 uses follower instead of slave.

* Add changelog fragment.
2023-01-07 16:44:27 +01:00
rietvelde
2670215c8a
Fix gem.py, hang on uninstall specific gem version (#5751)
* Update gem.py

move 'cmd.append('--executable')' to all uninstalls rather than only all versions

* Create 5751-gem-fix-uninstall-hang

* Rename 5751-gem-fix-uninstall-hang to 5751-gem-fix-uninstall-hang.yml
2023-01-07 10:31:50 +01:00
reverendj1
e3f02cb161
Add Support to Bitwarden Lookup for Custom Fields (#5694)
* Add Support to Bitwarden Lookup for Custom Fields

This adds support to the Bitwarden lookup for retrieving values from
custom fields, such as api keys.

* Need to Return Whole Record if Field is Not Defined

* whitespace

* Add Changelog Fragment

* Need to Make Sure All Login Fields are Represented

We need to make sure that all login fields are accounted for, since
there will be no other way to retrieve them with this change, and we
don't want to break backwards compatibility. Looking at this code from
the official client,
https://github.com/bitwarden/clients/blob/master/libs/common/spec/models/domain/login.spec.ts,
autofillOnPageLoad might be another login field.

* Update changelogs/fragments/5694-add-custom-fields-to-bitwarden.yml

Clarify changelog fragment

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

* Update plugins/lookup/bitwarden.py

Fix logic. Should only error if matches were found, but are missing the custom field.

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-01-07 10:28:05 +01:00
Teodor Janez Podobnik
fc2b1aac4a
terraform: bugfix: init command when default workspace doesn't exists (#5735)
* feat: init when default workspace doesn't exists

* doc: add changelogs fragment and docs update

* fix: changelog formating fix
2023-01-07 10:24:32 +01:00
Alexei Znamensky
dc531b183d
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>
2023-01-07 10:21:13 +01:00
Alexei Znamensky
02431341b7
snap: use MH execute() static method (#5773)
* use MH execute() static method

* add changelog fragment
2023-01-07 10:20:19 +01:00
Eric C Chong
4dc897d559
redhat_subscription: Add support for Red Hat API token (#5725)
Add support for Red Hat API token

fix mixed up

fix version
2023-01-05 21:36:07 +01:00
Felix Fontein
84ebda65f1
Fix callback plugin types (#5761)
Fix callback types.
2023-01-04 22:06:57 +01:00
Alexei Znamensky
b49bf081f8
ModuleHelper - fix bug when adjusting conflicting output (#5755)
* ModuleHelper - fix bug when adjusting conflicting output

* add changelog fragment

* remove commented test code
2023-01-04 11:59:06 +01:00
Fabian P. Schmidt
568e18809c
unixy Callback: Fix typo using ansibles config manager (#5744)
Fixes typo introduced in 53da86c.

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2022-12-30 22:35:03 +01:00
GuillaumeV-cemea
2d4ce9f219
feat: add tags to proxmox containers (#5714)
* feat: add tags to proxmox containers

* fix: correct version added

* fix: code style

* feat: changelog fragment

* fix: correct version_added

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

* feat: fail on unsupported params, rather than silently ignoring them

* fix: actually check unsupported feature presence before failing

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-12-30 22:09:00 +01:00
Alexei Znamensky
2ce3cf91b8
manageiq_tags: deprecate list state (#5727)
* manageiq_tags: deprecate list state

* add changelog fragment

* add comment to sanity ignore files
2022-12-23 07:13:56 +01:00
Alexei Znamensky
6383c82328
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>
2022-12-22 21:34:21 +01:00
joergho
b3485b8fca
opkg module: allow installing a package in a certain version (#5688)
* opkg: allow installing a package in a certain version

example:
- name: Install foo in version 1.2
  community.general.opkg:
    name: foo=1.2
    state: present

Signed-off-by: Joerg Hofrichter <joerg.hofrichter@ni.com>

* opkg: use list for passing arguments to run_command

Signed-off-by: Joerg Hofrichter <joerg.hofrichter@ni.com>

Signed-off-by: Joerg Hofrichter <joerg.hofrichter@ni.com>
2022-12-22 19:31:33 +01:00
Alexei Znamensky
28969c61ad
manageiq_policies: deprecate list state (#5721)
* manageiq_policies: deprecate list state

* add changelog fragment
2022-12-22 06:57:23 +01:00
Alexei Znamensky
2fc7baecf8
xfconf: prune deprecated facts-generating code (more of it) (#5719)
* xfconf: prune deprecated facts-generatin code (more of it)

* add changelog fragment
2022-12-22 06:54:02 +01:00
Alexei Znamensky
488e828f9b
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
2022-12-22 06:45:07 +01:00
Laurence
77fde030cd
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>
2022-12-20 12:49:11 +01:00
joergho
2b39470a77
opkg: fix issue that force=reinstall would not reinstall an existing package (#5705)
* opkg: fix issue that force=reinstall would not reinstall an existing package

Signed-off-by: Joerg Hofrichter <joerg.hofrichter@ni.com>

* changelog fragment

Signed-off-by: Joerg Hofrichter <joerg.hofrichter@ni.com>
2022-12-19 20:23:44 +01:00
castorsky
fab73a1d1e
Bugfix: Remove redundant VMID parameters (#5672)
* Remove redundant parameters VMID

* Add changelog fragment
2022-12-19 20:22:23 +01:00
Alexander Couzens
af53271c41
lxc_container: fix lxc argument when executing lxc command (#5659)
lxc_container fails when executing the lxc command (e.g. when creating
a new container) because PR#5358 broke the module argument
parsing. The resulting argument dict contained only the module argument name
and the argument flag but not the value. E.g.
```
- lxc_container:
    template: debian
```
would result in lxc command arguments `lxc template --template` instead of
`lxc --template debian`.

Fixes: 6f88426cf1 ("lxc_container: minor refactor (#5358)")
Fixes #5578

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
2022-12-17 12:10:23 +01:00
Alexei Znamensky
f95e0d775d
puppet: refactored to use CmdRunner (#5612)
* puppet: refactored to use CmdRunner

* add changelog fragment

* add more tests
2022-12-14 21:30:03 +01:00
Markus Bergholz
c3bc172bf6
respect new variable property in gitlab_group_variable and gitlab_project_variable (#5667)
* draft

* add changelog fragment

* rework

* rework group variables

* add new line at end of file

* Update plugins/module_utils/gitlab.py

Co-authored-by: Nejc Habjan <hab.nejc@gmail.com>

* rename

* revert

* return a copy

* Update plugins/modules/gitlab_project_variable.py

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

Co-authored-by: Nejc Habjan <hab.nejc@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-12-10 21:40:36 +01:00
Pino Toscano
471f523f53
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.
2022-12-08 22:40:37 +01:00
TSKushal
b22638ba0c
Adding PUT functionality to redfish_utils (Updated) (#5507)
* adding changelog fragment

* adding PUT functionality

* sanity fix

Co-authored-by: Kushal <t-s.kushal@hpe.com>
2022-12-05 18:31:50 +01:00
fachleitner
f0b3bba030
Fix keycloak_client_rolemapping role removal and diff (#5619)
* Keycloak: Fix client rolemapping removal

Keycloak's delete_group_rolemapping API wrapper didn't pass data about
the roles to remove to keycloak, resulting in removal of all roles.

Follow the intended behaviour and delete only the roles listed in the
module invocation.

Signed-off-by: Florian Achleitner <flo@fopen.at>

* Keycloak: Fix client_rolemapping diff

The module's diff output wrongly showed the changed roles list as
'after' state. This is obviously wrong for role removal and also
wrong for role addition, if there are other roles assigned.

Use the result of the API query for 'end_state' for 'diff' as well.

Signed-off-by: Florian Achleitner <flo@fopen.at>

* Keycloak: Calculate client_rolemapping proposed state properly

Signed-off-by: Florian Achleitner <flo@fopen.at>

* Add changelog fragment

Signed-off-by: Florian Achleitner <flo@fopen.at>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>

* Fix for python2 unit test

Signed-off-by: Florian Achleitner <flo@fopen.at>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-12-05 06:23:00 +01:00
Arek Kalandyk
fb2833d34d
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
2022-12-04 12:57:54 +01:00
domelek
632fc07e65
Updated tags delimiter (#5602)
* Updated tags delimiter

Starting from Proxmox 7.3 tags are delimited by semicolon. For backward compatibility it needs to be splitted by both commas and semicolons.

* Added missing space

* Add changelog fragment.

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-12-04 12:42:46 +01:00
Alexei Znamensky
be22ca0633
cmd_runner: allow bool format to pass alternate (false) value (#5647)
* allow bool format to pass alternate (false) value

* add changelog fragment
2022-12-04 12:18:33 +01:00
Torgny Bjers
fd436bdbc2
fix typo disable_looups in inventory/proxmox (#5640)
* fix typo disable_looups in inventory/proxmox

- resolve issue with lookups in proxmox inventory config

* add changelog fragment

* Update changelogs/fragments/5640-fix-typo-proxmox-inventory.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-12-02 06:43:22 +01:00
William McBroom
03039a56c0
Remove automatically adding # symbol to channel names (#5629)
* Add regex to match all channel ids

* Add changelog fragment

* Allow matching of channel ids with 9-11 characters

* Fix file name

* Update changelogs/fragments/5629-add-channel-prefix-regex.yml

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

* Remove channel auto prepend #

* Update changelog fragment

* Add prepend_hash option

* Add version_added to prepend_hash doc string

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

* Add description of possible values for the prepend_hash option

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

* Remove old channel assign statement

* Update changelogs/fragments/5629-add-prepend-hash-option-for-channel-id.yml

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

* Update changelog fragment tag

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-12-01 22:17:09 +01:00
Lee Garrett
428e181440
vdo: Use yaml.safe_load() instead of yaml.load() (#5632)
* vdo: Use yaml.safe_load() instead of yaml.load()

yaml.load() without specifying a Loader= is deprecated and unsafe.

For details, see
https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation

* Update changelogs/fragments/5632-vdo-Use-yaml-safe-load-instead-of-yaml-load.yml

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

Co-authored-by: Lee Garrett <lgarrett@rocketjump.eu>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-11-30 22:48:32 +01:00
Carlos Neira
b8545d10e6
Fix for vmadm get_vm_uuid out of range (#5628)
* Fix for vmadm get_vm_uuid out of range  

* Fix for vmadm get_vm_uuid out of range

* Update changelogs/fragments/5628-fix-vmadm-off-by-one.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-11-30 22:41:35 +01:00
Pino Toscano
f7fa54eed9
redhat_subscription: don't discard vars with key (#5627)
Fixes #3486. From the man-pages of subscription-manager, none of the
parameters used are tied to the activationkey except the two that remain
in its else-clause.

Note that type is not mentioned in the man-pages on 7.6 (at least), but
is still present and available.

Co-authored-by: Thor K. H <thor@roht.no>
2022-11-30 22:15:55 +01:00
Pino Toscano
101c957631
redhat_subscription: drop unneeded args to Rhsm.register() (#5583)
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
2022-11-29 13:07:08 +01:00
Fabian P. Schmidt
53da86c1a5
unixy Callback: Use Ansible's config manager (#5601)
* unixy Callback: Use Ansible's config manager

In ansible-core 2.14 deprecated support was removed[1] for accessing options
of the DefaultCallback via class attributes. Use the "new" config system
instead.

[1]: dbdbfe845a

Fixes #5600.

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>

* Update changelog fragment.

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-11-28 21:51:23 +00:00
Naewis
1ca775248f
java_certs : Not enough info on error (#5550)
* java_certs : Not enough info on error

Just bumped into an issue when the message was "Internal module failure, cannot extract public certificate from pkcs12, error: "
Seems that the issue #2560 doesn't cover all cases. To make debugging easier, I propose to add error output on json return instead of only expose standard output.

* java_certs - add missing fragment message

* Word-smithing.

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-11-28 22:44:24 +01:00
Rainer Leber
b1094d840f
Redirect and Remove sap modules (#5592)
* redirect and remove sap modules

* remove botmeta redirect

* add changelog fragment

* revert runtime.yml changes and add new entries

* Update meta/runtime.yml

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

* Update changelogs/fragments/5592-redirect-remove-sap-modules.yml

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

* Update changelogs/fragments/5592-redirect-remove-sap-modules.yml

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

* Update 5592-redirect-remove-sap-modules.yml

Fix indentation

* Fix RST syntax.

* Update meta/runtime.yml

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

* Update meta/runtime.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-11-27 13:59:29 +01:00
Alexei Znamensky
a3b748a15e
udm_share: fix sanity checks (#5557)
* udm_share: fix sanity checks

* add changelog fragment
2022-11-26 18:41:45 +01:00
Alexei Znamensky
79929830c4
udm_user: sanity (#5559)
* 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
2022-11-23 18:43:58 +01:00
Mike Raineri
5c1c8152ec
Redfish: Expanded SimpleUpdate command to allow for users to monitor the progress of an update and perform follow-up operations (#5580)
* Redfish: Expanded SimpleUpdate command to allow for users to monitor the progress of an update and perform follow-up operations

* Update changelogs/fragments/3910-redfish-add-operation-apply-time-to-simple-update.yml

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

* Update plugins/modules/redfish_command.py

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

* Update changelogs/fragments/4276-redfish-command-updates-for-full-simple-update-workflow.yml

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

* Updated based on feedback and CI results

* Update plugins/modules/redfish_command.py

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

* Update plugins/modules/redfish_command.py

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

* Update plugins/modules/redfish_info.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-11-23 07:46:39 +01:00
David Stuart
52c28494ca
Add additional flags to nmap.py (#5566)
* Adding extra flag options for NMAP scaning udp_scan, icmp_timestamp and dns_resolve

* Update nmap.py

* Update plugins/inventory/nmap.py

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

* Updates as per felixfontein  suggestions

* Updates as per felixfontein  suggestions

* 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>

* Update nmap.py

* Update changelogs/fragments/5566-additional-flags-nmap.yml

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

* Update changelogs/fragments/5566-additional-flags-nmap.yml

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

* Update 5566-additional-flags-nmap.yml

* Update nmap.py

Co-authored-by: Axis12 <3225945+axistwelve@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-11-17 06:56:21 +01:00
Alexei Znamensky
8ad43fd774
jenkins_plugin: fix sanity checks (#5565)
* 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>
2022-11-17 06:55:46 +01:00
Evan Jarrett
5e5af458fb
chroot plugin fix inventory_hostname var for remote_addr (#5570)
* Add inventory_hostname under remote_addr.vars in chroot connection plugin required by ansible 2.13

* fix changelog fragment
2022-11-17 06:53:46 +01:00
Alexei Znamensky
6a03108609
rax_scaling_group: fix sanity check (#5563)
* rax_scaling_group: fix sanity check

* add changelog fragment

* added missing call to expanduser()
2022-11-16 21:58:55 +01:00
Alexei Znamensky
e87ca10b61
cmd_runner module utils: fix case for as_fixed() format (#5538)
* 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()
2022-11-16 06:44:40 +01:00
Alexei Znamensky
270dc133b3
spotinst_aws_elasticgroup: sanity checks (#5553)
* 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>
2022-11-15 22:37:48 +01:00
Alexei Znamensky
9874462abb
lxd_project: refactored os.path.expanduser() to module utils (#5549)
* lxd_project: refactored os.path.expanduser() to module utils

* add changelog fragment
2022-11-15 21:04:29 +01:00
Alexei Znamensky
6c7e9116e1
gconftool2: refactored to use ModuleHelper + CmdRunner (#5545)
* gconftool2: refactored to use ModuleHelper + CmdRunner

* add changelog fragment

* removed old code commented out
2022-11-15 21:02:45 +01:00
Felix Fontein
60c8b9a67f
dependent lookup: prevent deprecation warning with ansible-core 2.14 (#5543)
* Prevent deprecation warning.

* Improve naming and add comment.
2022-11-15 08:12:09 +01:00
Felix Fontein
672385309c Add changelog fragment. 2022-11-13 21:06:11 +01:00
Alexei Znamensky
bc0f99386b
xfconf: prune deprecated facts-generation code (#5502)
* xfconf: prune deprecated facts-generatin code

* add changelog fragment

* adjust changelog fragment

* Update changelogs/fragments/5502-xfconf-facts-deprecation.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-11-10 21:18:52 +01:00
Tong He
7610501c66
Fix a logical flaw when deleting a build in the jenkins_build module (#5514)
* 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>
2022-11-10 21:18:01 +01:00
Sam Doran
c604cc5ba9
onepassword_raw - Add missing parameter to doc string (#5511)
* onepassword_raw - Add missing parameter to doc string

* Remove redundant mention of default value

* Update changelogs/fragments/5506-onepassword_raw-missing-param.yml

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-11-09 07:28:49 +01:00
wh1t3 r4bb1t
621fb6a619
one_vm: fix for 'NoneType' object has no attribute 'split' in get_vm_labels_and_attributes_dict (#5489)
* Fix for 'NoneType' object has no attribute 'split'

* Added changelog to fix

* Update changelogs/fragments/5489-nonetype-in-get-vm-by-label.yml

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

* Fix line ending in changelog

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-11-08 23:00:05 +01:00
Felix Fontein
16cd2ae76e Next expected release will be 6.1.0. 2022-11-07 21:33:42 +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
8758f6a43f
mksysb: using CmdRunner (#5484)
* mksysb: using CmdRunner

* add changelog fragment

* adjust code when check_mode true

* Update plugins/modules/mksysb.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-11-07 20:02:10 +01:00
Yuhua Zou
c757e20d10
fix the issue#5275: iso_create doesn't add folders (#5468)
* fix the issue

* add changelog

* add changelog file

* Update changelogs/fragments/5468-iso-create-not-add-folders.yml

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-11-07 07:00:55 +01:00
Alexei Znamensky
7a9af2b601
hponcfg: using CmdRunner (#5483)
* hponcfg: using CmdRunner

* add changelog fragment
2022-11-07 06:43:21 +01:00
Felix Fontein
f4bad50bbb Prepare 6.0.0 release. 2022-11-06 11:48:14 +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
fb90b5cbe8
ansible_galaxy_install: using CmdRunner (#5477)
* ansible_galaxy_install: using CmdRunner

* fix sanity checks

* add changelog fragment
2022-11-06 11:40:30 +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
Martin
ee39fd5c90
Allow for DN's to have {x} prefix on first RDN (#5450)
* Allow for DN's to have {x} prefix on first RDN

* Update changelogs/fragments/5450-allow-for-xordered-dns.yaml

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

* Assign attrs to throw-away var

* Update plugins/module_utils/ldap.py

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

* Escape DN before creating filter

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-11-05 12:43:28 +01:00
Reto Kupferschmid
1a97ca1a6f
ldap_attrs: escape ldap search filter (#5435)
* escape ldap search filter

* move escape to separate line

* add changelog fragment

* Update changelogs/fragments/5435-escape-ldap-param.yml

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

* fix encoding

* fixup! fix encoding

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-11-04 07:07:06 +01:00
Felix Fontein
012896da18 Release 6.0.0-a1. 2022-11-02 21:49:29 +01:00
Felix Fontein
32ce09504c Fix version. 2022-11-02 21:47:05 +01:00
Felix Fontein
9d34636edc Prepare 6.0.0a1 release. 2022-11-02 21:45:27 +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
Simon-TheUser
5cb9a9e4f0
nsupdate: issues/4657 (#5377)
* Insert new entries before deleting old ones.
resolves #4657

* Slight wording changes.

* lint fix

* Address lint

* Added changelog
Fixed lint

* More linting

* Update changelogs/fragments/5377-nsupdate-ns-records-with-bind.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-11-02 20:13:50 +01:00
Jan-Philipp Litza
e4b9e098c7
Clearer error logging in passwordstore lookup (#5436)
* Clearer error logging in passwordstore lookup

* Add changelog fragment for passwordstore errmsgs

Co-authored-by: Sylvia van Os <sylvia@hackerchick.me>
2022-11-02 20:12:21 +01:00
Mike Raineri
ea3550d838
Redfish: centralize payload inspection logic and OEM logic (#5425)
* Redfish: centralize payload checking when performing modification requests to a Redfish service

* CI fixes

* Updates based on unit testing

* CI fix

* Modified vendor-specific logic to establish common pattern for workarounds
2022-11-02 07:40:21 +01:00
Felix Fontein
47cc2a4e8e
dnstxt lookup - add option to return empty list. (#5457) 2022-11-01 22:19:33 +01:00
Felix Fontein
e718bd8445
Lookups: use Ansible's config manager whenever possible (#5440)
* Start using Ansible's config manager to handle options.

* Docs improvements.

* Fix documentation, make options actual lookup options.

* The cyberarkpassword lookup does too strange things.

* The onepassword lookups are converted in #4728, let's not interfere.

* Improve docs.

* Skip shelvefile as well.

* Convert lmdb_kv.

* Convert and fix credstash.

* Convert manifold.

* Drop chef_databag.

* Convert dig.

* Update examples.

* Forgot the most important part.

* Fix lmdb_kv docs.

* Python 2.6 compatibility.

* Convert AnsibleUnicode to str.

* Load lookup with lookup loader.

* Fix environment handling and error message checking.

* Improve docs formatting.
2022-11-01 21:58:46 +01:00
Alex Groshev
dc66aefa40
fix int options idempotence bug and add new test to check it (#5443) 2022-11-01 21:40:17 +01:00
Felix Fontein
5f4e593116 Revert "Fix non-matching defaults in docs (#5446)"
This reverts commit a978bff2c7.
2022-11-01 19:12:21 +01:00
Felix Fontein
a978bff2c7
Fix non-matching defaults in docs (#5446)
* Allow to pass options as lookup options.

* Adjust tests.

* Fix non-matching defaults.
2022-11-01 18:11:02 +01:00
Brian Coca
f1d5f71b8d
proxmox inventory, remove redundant and simplify code (#5437)
* remove redundant and simplify code

we already have a templar from base class

loop reuses code instead of X copies of it

* whitey

* no need to import templar again

* Add changelog fragment.

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-11-01 07:33:54 +01:00
Brian Coca
20b84fc709
linnode inventory, remove redundant (#5438)
* remove redundant

templar is already in base class
env var is already consulted in via config resolution

* more whites

* no need to import templar again

* Add changelog fragment.

* Try to update tests.

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-11-01 07:33:43 +01:00
Jan-Piet Mens
df34a7b0f2 add option to force dig lookup to return empty list instead of list of empty strings. (#5439)
fixes https://github.com/ansible-collections/community.general/issues/5428
2022-10-29 10:51:03 +02:00
Felix Fontein
2830a3452d
Remove deprecated features, bump version to 6.0.0 (#5326)
* Bump version to 6.0.0.

* sender option is now required.

* Default of want_proxmox_nodes_ansible_host changed from true to false.

* username is now an alias of user, and no longer of workspace.

* Remove deprecated return values in favor of end_state.

* Remove debug option.

* Change default of ignore_volatile_options from true to false.

* gitlab_group must now always contain the full path.

* Change default of norc from false to ture.

* Remove deprecated property.

* Add PR URL.

* Adjust bitbucket unit tests.

* Adjust module_helper integration test.
2022-10-25 08:07:21 +02:00
Martin
091bdc77c3
ldap_attrs: search_s based _is_value_present (#5385)
* search_s based _is_value_present

* Fix formatted string and ldap import

* Add changelog fragment

* Remove superfluous import ldap

* Improve fragment

* Code format {x} prefix

* Lower-case fixes

* Fix suggestions to changelog

* Break with the past and let bools be bools

* Let ldap_attrs break on invalid DN's
2022-10-25 08:01:57 +02:00
Felix Fontein
c88f0f4ca0 Fix broken changelog fragment. 2022-10-24 21:02:22 +02:00
Alexander Holzapfel
b9d0864957
Send string instead of boolean to proxmox api (#5198)
* Send string instead of boolean to proxmox api

* Add changelog fragment.

* Update plugins/modules/cloud/misc/proxmox_kvm.py

Co-authored-by: castorsky <csky57@gmail.com>

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: castorsky <csky57@gmail.com>
2022-10-23 18:25:03 +02:00
Alexei Znamensky
91cac4c816
MH CmdModuleHelper: deprecation (#5370)
* MH CmdModuleHelper: deprecation

* add changelog fragment

* add deprecation comments in many parts of the code
2022-10-23 16:34:04 +02:00
Alexei Znamensky
f5ca03047d
django_manage: deprecate venv creation when missing (#5405)
* deprecate venv creation when missing

* add changelog fragment

* fix sanity checks

* Update changelogs/fragments/5404-django-manage-venv-deprecation.yml

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

* Update plugins/modules/web_infrastructure/django_manage.py

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

* Update plugins/modules/web_infrastructure/django_manage.py

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

* minor change to help future removal of feature

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-10-23 16:33:14 +02:00
Alexei Znamensky
baa8bd52ab
pkgng: fix error-handling when upgrading all (#5369)
* pkgng: fix error-handling when upgrading all

* provide for rc=1 in check_mode + test

* fix name of task in test

* add changelog fragment
2022-10-23 11:42:53 +02:00
ThomasGebert
b54483b52e
nmcli: add transport_mode configuration for Infiniband devices (#5361)
* Adds transport_mode configuration for Infiniband devices

Adds transport_mode configuration for Infiniband based ipoib devices,
which is one of:
  - datagram (default)
  - connected

* Remove trailing whitespace

* Add changelog fragment

* Update changelogs/fragments/5361-nmcli-add-infiniband-transport-mode.yaml

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

* Update plugins/modules/net_tools/nmcli.py

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

* Update plugins/modules/net_tools/nmcli.py

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

* Remove default for transport_mode

* Add test for changing Infiniband transport_mode

* remove blank line at end of file

Co-authored-by: Thomas Gebert <thomas.gebert@atos.net>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-10-23 11:30:48 +02:00
Alexei Znamensky
7857d0669e
django_manage: deprecate old commands (#5400)
* deprecate old commands

* add changelog fragment

* fix django version in docs

* fix wording on the deprecations

* Update changelogs/fragments/5400-django-manage-deprecations.yml

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

* update chglog fragment

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-10-22 08:42:52 +02:00
Felix Fontein
5aa1e58749
Do not crash when lzma is not around. (#5393) 2022-10-20 20:32:18 +02:00
Felix Fontein
c3bdc4b394
Fix module. (#5383) 2022-10-19 10:13:04 +02:00
Paul Sanchez
b0bb994c3e
virtualbox: Fix crash when handling deeply nested hostvars (#5348)
* virtualbox: Fix nested data parsing

- Skip parsing values with keys that have both a value and nested data.
- Skip parsing values that are nested more than two keys deep.

* Update changelogs/fragments/5348-fix-vbox-deeply-nested-hostvars.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-10-18 09:17:49 +02:00
Alexei Znamensky
dfe1f9a29e
consul: pythonisms + a couple of required_if clauses (#5367)
* consul: pythonisms + a couple of required_if clauses

* adjust condition of if

* adjust condition of if (again)

* Update plugins/modules/clustering/consul/consul.py

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

* simplify parse_check logic

* fix condition of if

* remove test made redundant by required_if

* add changelog fragment

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-10-18 09:17:13 +02:00
Victor Martinez
5732023aa2
[opentelemetry][callback] support opentelemetry-api 1.13 (#5342)
* [opentelemetry][callback] support opentelemetry-api 1.13

* [opentelemetry][callback] changelog fragment

* Update changelogs/fragments/5342-opentelemetry_bug_fix_opentelemetry-api-1.13.yml

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

* [opentelemetry-callback] refactor time_ns in a function

* fix linting

* change branch outside of the function

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

* [opentelemetry]: remove options from suggestion

* Apply suggestions from code review

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

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-10-18 09:16:11 +02:00
ajakk
2a54644cfa
portage: drop usage of gentoolkit, add knobs for --with-bdeps, --backtrack (#5349)
* portage: drop dependency on gentoolkit (provides equery)

Portage installs a Python module, which is available anywhere that
Portage itself is available. We can use that instead of calling a
shell command.

Signed-off-by: John Helmert III <ajak@gentoo.org>

* portage: add knob for emerge's --backtrack flag

Signed-off-by: John Helmert III <ajak@gentoo.org>

* portage: add knob for portage's --with-bdeps option

Also, this option does not accept "True" like other options. Instead,
it only uses 'y' and 'n', so parse booleans properly into these chars.

Signed-off-by: John Helmert III <ajak@gentoo.org>

* Add changelog entry for #5349

Signed-off-by: John Helmert III <ajak@gentoo.org>

Signed-off-by: John Helmert III <ajak@gentoo.org>
2022-10-14 22:31:02 +02:00
Alexei Znamensky
6f88426cf1
lxc_container: minor refactor (#5358)
* lxc_container: minor refactor

* add changelog fragment
2022-10-14 22:28:20 +02:00
Wei Liao
7e2a6cf198
Updated to use the new newrelic v2 api (#5341)
* updated to use the new newrelic v2 api

* check that application_id is set

* indenting issue

* added back app_name

* fix import ordering

* resolving various spellings & wordings

* fixed wordings

* validate_certs

* fixed unreachable code
2022-10-12 10:42:17 +02:00
Victor Martinez
8c04133284
opentelemetry: send logs (#4175)
* opentelemetry: logs property

* opentelemetry: support for span events with the Task dump output

* opentelemetry: support property to disable the logs

* bump the version when supported

* add section ini

* test: fix change of signature

* [opentelemetry][callback] changelog fragment

* Apply suggestions from code review

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-10-10 20:54:52 +02:00
manschwetusCS
dc2d3c24fa
Make pfexec become usable for illumos (#3889)
* Experimental change from OpenIndiana

* resolve pfexec problem, by removing superfluous quotes

* reimplement "wrap_exe"

* remove spaces arround keyword argument assignment

* adapted pfexec unit test

* Try to fix quoting of test expression

* Fix quoting of test expression by replacing ' with "

* Add changelog fragment
2022-10-05 08:26:40 +02:00
henkwiedig
96b6ef5765
znode: add options for authentication (#5306)
* add options for authentication

* Update changelogs/fragments/5306-add-options-for-authentication.yml

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

* Update plugins/modules/clustering/znode.py

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

* Update plugins/modules/clustering/znode.py

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

* Update plugins/modules/clustering/znode.py

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

* Update plugins/modules/clustering/znode.py

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

* rename scheme to auth_scheme, credential to auth_credential

* make pycodestyle happy

* Update plugins/modules/clustering/znode.py

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

* Update plugins/modules/clustering/znode.py

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

* remove unneeded quotes

* Update changelogs/fragments/5306-add-options-for-authentication.yml

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

* Update version_added.

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-10-05 08:23:15 +02:00
Kosala Atapattu
beef93f687
Allow terraform module to specify complex variable structures (#4797)
* Adding capability to specify complex variables type to terraform

* Terrform variable types are mapped to ansible veriable types

* Currently handles Dict, List, Str, Int, Bool types

* Updated the documentation accordingly

* Updated with an example.

* Update plugins/modules/cloud/misc/terraform.py

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

* Update plugins/modules/cloud/misc/terraform.py

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

* Update plugins/modules/cloud/misc/terraform.py

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

* Update plugins/modules/cloud/misc/terraform.py

Wonder how that missed the PEP8 checks :).

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

* Update plugins/modules/cloud/misc/terraform.py

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

* Adding the changelog fragment

* Update plugins/modules/cloud/misc/terraform.py

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

* Adding ``integer_types`` from ``module_utils``

Simplified the ``integer_types``,  ``str`` and ``float`` value population through ``json.dumps()``.  Now the strings can have special characters which can break the module execution.

* Update changelogs/fragments/4797-terraform-complex-variables.yml

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

* * Changed to approach to make the code more readble and simple to understand.

    * Maintaining the original for loop for the top_level variables. Therefore the rocess_conplex_args() now only handle second level variables when the type() is either Dict or List.

    * Json dumps are used only for the low level variables. Terraform CLI had issues interpreting escape sequecences from json.dumps()

* Update plugins/modules/cloud/misc/terraform.py

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

* adding boolean explicitly, although boolean is a subclass of integer, adding this for self documentation pupose and the clarity of the code.

* fixing the doc strings

* Update terraform.py

Fixing docstrings

* * Introducing format_args funtion to simplify formatting each argument type for top_level and lower level.

* Terraform Lists of strings, numbers, objects and lists are supported.

* Adding COMMAND: to the fail_json msg, for plan failures to help troubleshoot command line arguments.

* Update plugins/modules/cloud/misc/terraform.py

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

* * Adding full terraform command to fail_json() when the terrafor plan fails
    * Fixing a spelling mistake.

* plan_command if a list, stringifying the list

* * Fixing the new line for the change fragments

* Removed CR (\r) from the output messages. Now output lines carry only LF (\n), not CRLF (\r\n).

* Added integration testing for complex variables.

* Restructured integration testing code to be more expandable.

* Update changelogs/fragments/4797-terraform-complex-variables.yml

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

* Update plugins/modules/cloud/misc/terraform.py

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

* double-quotes are not properly escaped in shell, and python string
escaping are nullified the way terraform handle second tier string
variables (within terraform).

* changing all the task actions to FQCN format.

* integration testing now includes:

1. Top level strings containing, special shell characters, spaces,
   double-quotes.

2. Second level strings containing, special shell characters, spaces,
   double-quotes repeating double-quotes to ensure proper regex
substitution.

* Adding colon ':' to string test casses.

* Added complex_vars to switch between the old and the new variable
interpretations.
Updated the documentations to reflect the changes.
Updated the examples.
Handling '\' as well with the escape sequence.

* Added tests for the new escape sequences.
Added multilines tests.

* Restructuring the documente strings to a shorter string.
Argument_spec changed to 'bool'

* Update changelogs/fragments/4797-terraform-complex-variables.yml

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

* Update plugins/modules/cloud/misc/terraform.py

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

* Update plugins/modules/cloud/misc/terraform.py

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

* Update plugins/modules/cloud/misc/terraform.py

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

* Update plugins/modules/cloud/misc/terraform.py

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

* Update plugins/modules/cloud/misc/terraform.py

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

* Update plugins/modules/cloud/misc/terraform.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-10-03 22:10:16 +02:00
cfiehe
6fe2a84e87
Fix #5313: redhat_subscription module is not idempotent when pool_ids (#5319)
This fix ensures the idempotency of the redhat_subscription module when pool_ids are used. The main problem was, that a 'None' quantity was not properly handled and that the quantity check compared a string with an integer.

Signed-off-by: Christoph Fiehe <c.fiehe@eurodata.de>

Signed-off-by: Christoph Fiehe <c.fiehe@eurodata.de>
Co-authored-by: Christoph Fiehe <c.fiehe@eurodata.de>
2022-10-03 20:24:53 +02:00
betuxy
394647df84
bitwarden: Add field to search for all item attributes, instead of on… (#5297)
* bitwarden: Add field to search for all item attributes, instead of only name.

* bitwarden: Add change to changelog.

* bitwarden: Update changelog entry.

* Update changelogs/fragments/5297-bitwarden-add-search-field.yml

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

* Update plugins/lookup/bitwarden.py

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

* Update plugins/lookup/bitwarden.py

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

Co-authored-by: Ole Pannbacker <opannbacker@cronon.net>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-10-01 18:19:39 +02:00
Kevin Carter
2eba5dc4e7
chore: Update lxc_container to support py3 (#5304)
* chore: Update lxc_container to support py3

This change is mostly just a documentation change which will report the requirements
correctly for python3-lxc. I've also removed the use of six which results in us
changing `xrange` to `range`.

Resolves: https://github.com/ansible-collections/community.general/issues/5294
Signed-off-by: Kevin Carter <kevin.carter@figment.io>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* Update changelogs/fragments/5280-lxc_container-py3.yaml

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

* Update changelogs/fragments/5280-lxc_container-py3.yaml

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

* Update 5280-lxc_container-py3.yaml

* Update 5280-lxc_container-py3.yaml

Signed-off-by: Kevin Carter <kevin.carter@figment.io>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-10-01 18:02:48 +02:00
azrdev
202cabc769
terraform: run init with no-color, too (#5147)
* terraform: run `init` with no-color, too

When running `terraform init` fails, it would output ansi color sequences, making the output hard to read.

Maybe setting TF_IN_AUTOMATION would also be beneficial: https://www.terraform.io/cli/config/environment-variables#tf_in_automation

* add changelog fragment for `terraform init -no-color`

* move changelog into correct directory; add PR link
2022-10-01 10:25:12 +02:00
Giorgio Gallo
ec9e10d6d1
nmcli: fix error when setting previously unset mac address (#5291)
* fix #5290

* add changelog fragment

* remove unnecessary braces

* Update changelogs/fragments/5291-fix-nmcli-error-when-setting-unset-mac-address.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-28 22:49:07 +02:00
nxet
25e3031c2f
[feat] proxmox_snap: snapshot containers with configured mountpoints (#5274)
* module_utils.proxmox: new `api_task_ok` helper + integrated with existing modules

* proxmox_snap: add `unbind` param to snapshot containers with mountpoints

* [fix] errors reported by 'test sanity pep8'
at 
https://github.com/ansible-collections/community.general/pull/5274#issuecomment-1242932079

* module_utils.proxmox.api_task_ok: small improvement

* proxmox_snap.unbind: version_added, formatting errors, changelog fragment

* Apply suggestions from code review

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

* proxmox_snap.unbind: update version_added tag

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-28 22:48:11 +02:00
Ben Brown
f3bcfa5a75
machinectl: include the success command (#5287)
Combines the success command when building the become command. This is
consistent with other become plugins.
2022-09-25 21:09:08 +02:00
tejabailey
d9d830a168
Add SetSessionService to redfish_config (#5009)
* Add SetSessionService to redfish_config
adding SetSessionService command to redfish_config
to set BMC default session timeout policy.

Fixes #5008

* fix white space issues

* Making Requested changes:
 - changed category from SessionService to Sessions
 - changed set_sessionservice() to set_session_service()
 - other misc. changes for cleanup

* Apply suggestions from code review

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

* Fix issues with checks

* Fix issues with checks part 2

* Fix issues with checks part 3

* Update plugins/modules/remote_management/redfish/redfish_config.py

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

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-25 17:07:45 +02:00
Bartosz-lab
fb1cf91ebd
locale_gen: fix UbuntuMode (#5282)
* Fix UbuntuMode

* Fix indentation

* Create 5281-locale_gen.yaml

* Update and rename 5281-locale_gen.yaml to 5282-locale_gen.yaml

* apply suggested changes

* apply suggested change
2022-09-25 16:31:32 +02:00
Alexei Znamensky
f0ee21b8b2
ini_file: fix lint error (#5307)
* ini_file: fix lint error

* add changelog fragment

* remove line from sanity test ignore files
2022-09-25 16:28:06 +02:00
Marc Leuser
a6c8078ccf
netcup_dnsapi: Add timeout paramter (#5301)
* netcup_dnsapi: Add timeout paramter

* add changelog fragment

* Apply suggestions from code review

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

* remove unnecessary newline

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-22 07:17:45 +02:00
sprnza
b5d311a171
slack: add CP channel prefix (#5249)
* add CP channel prefix

* changelog added

* altered docs

* added description for docs change

* fix line length

* Update plugins/modules/notification/slack.py

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

* Update plugins/modules/notification/slack.py

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

* Update plugins/modules/notification/slack.py

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

* Update plugins/modules/notification/slack.py

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

* Update changelogs/fragments/5249-add-new-channel-prefix.yml

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

Co-authored-by: Денис Сперанский <d_speranskiy@head-point.ru>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-12 20:32:14 +02:00
Yvan Watchman
19e4b7d3ab
add a couple conditionals to make sure updating can be done with vmid… (#5206)
* add a couple conditionals to make sure updating can be done with vmid only

* add changelog to PR

* replace conditional with any

* any takes list

* fix next conditional

* Update changelogs/fragments/5206-proxmox-conditional-vmid.yml

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

* capitalize VM and remove conditional for name requirement upon creation

* Fix URL destroyed by GitHub.

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

Co-authored-by: Yvan E. Watchman <git@yvanwatchman.eu>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-09-12 20:31:30 +02:00
Alexei Znamensky
fbb6ceea1d
gitlab_hook: minor refactoring (#5271)
* gitlab_hook: minor refactoring

* add changelog fragment
2022-09-12 20:30:49 +02:00
Alexei Znamensky
6b463e6fa6
gitlab modules: improved imports (#5259)
* gitlab modules: improved imports

* add changelog fragment

* refactored the import check to its sole function
2022-09-12 20:30:02 +02:00
Felix Fontein
5470ea30dc
Fix changelogs killed by GitHub. (#5272) 2022-09-10 12:24:14 +02:00
Shaul Shnaidman
33059a807c
changed the default proxmox container unprivileged flag (#5224)
* changed the default proxmox container to unprivileged

* Reverted the default value with a deprecation.

* use true/false instead of yes/no

* Update plugins/modules/cloud/misc/proxmox.py

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

* Apply suggestions from code review

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

* param -> parameter

* Apply suggestions from code review

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

* fix

* review

* Update changelogs/fragments/5224-proxmox-unprivileged-default.yaml

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

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-10 10:53:08 +02:00
Pavel Zwerschke
f929422dac
osx_defaults: add expand_user_and_vars flag to write (#5243)
* Add expand_user_and_vars flag to write

Closes #5234

* Add changelog

* Update changelogs/fragments/5243-osx-defaults-expand-user-flags.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-10 10:52:14 +02:00
Alexei Znamensky
775be1d3f3
multiple modules: removed unused imports (#5240)
* multiple modules: removed unused imports

* fixed ali_instance(_info) import check

* add changelog fragment

* Update changelogs/fragments/5240-unused-imports.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-09 22:23:48 +02:00
Dawid Dziurla
be9acc7fba
homebrew: add Linux brew path to defaults (#5241)
* homebrew: add Linux brew path to defaults

* changelogs: add 5241 fragment

* homebrew_tap: add Linux brew path to defaults

* changelogs: update 5241 entry

* homebrew_tap: format path separator in desc

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-08 07:46:10 +02:00
betuxy
b4f89b78dd
nmcli: Add xmit_hash_policy to bond options. (#5149)
* Add xmit_hash_policy to nmcli bond-options.

* #5149 - Add changelog fragment.

* Update plugins/modules/net_tools/nmcli.py

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

* Update changelogs/fragments/5149-nmcli-bond-option.yml

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

Co-authored-by: Ole Pannbacker <opannbacker@cronon.net>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-08 07:45:23 +02:00
Chih-Hsuan Yen
946c48d148
nmcli: honor IP options for VPNs (#5228)
* nmcli: honor IP options for VPNs

This can be used for split tunneling - I extended a test as an example.

* Add changelog
2022-09-08 07:44:54 +02:00
Alexei Znamensky
570445adc4
nagios: some refactoring (#5239)
* nagios: some refactoring

* rollback one change

* add changelog fragment

* Update changelogs/fragments/5239-nagios-refactor.yaml

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

* Update plugins/modules/monitoring/nagios.py

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

* Update plugins/modules/monitoring/nagios.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-06 07:33:55 +02:00
Mike Moerk
2a449eb163
WDC Redfish support for setting the power mode. (#5145)
* WDC Redfish support for setting the power mode.

* Apply suggestions from code review

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

* Add change fragment.

* Add extension to changelog fragment.

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-03 12:45:03 +02:00
wilfriedroset
feabe20c63
consul: add support for session token (#5193)
Signed-off-by: Wilfried Roset <wilfriedroset@users.noreply.github.com>

Signed-off-by: Wilfried Roset <wilfriedroset@users.noreply.github.com>
2022-09-03 12:17:54 +02:00
PKehnel
36a7939962
Bugfix - EnvironmentError with wrong indentation (#5202)
* The EnvironmentError is now handled in the splid_pid_name function.

The error also had a wrong indentation. See previous setup with correct setup: 6a7811f696/plugins/modules/system/listen_ports_facts.py

* Add changelog fragment

* Sanity Check failed before

* Update changelogs/fragments/5202-bugfix-environmentError-wrong-indentation.yaml

Co-authored-by: Paul-Kehnel <paul.kehnel@ocean.ibm.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-03 12:04:42 +02:00
Chih-Hsuan Yen
6ff594b524
nmcli: avoid changed status for most cases with VPN connections (#5126)
* nmcli: avoid changed status for most cases with VPN connections

Follow-up https://github.com/ansible-collections/community.general/pull/4746

* `nmcli connection show` includes vpn.service-type but not vpn-type.
  Switching to vpn.service-type removes unneeded diffs while keeping
  the same functionality, as vpn-type is an alias of vpn.service-type
  per nm-settings-nmcli(1).

  NetworkManager also adds `org.freedesktop.NetworkManager.` prefix for
  known VPN types [1]. The logic is non-trivial so I didn't implement it
  in this commit. If a user specifies `service-type: l2tp`, changed will
  be always be True:

    -    "vpn.service-type": "org.freedesktop.NetworkManager.l2tp"
    +    "vpn.service-type": "l2tp"

* The vpn.data field from `nmcli connection show` is sorted by keys and
  there are spaces around equal signs. I added codes for parsing such
  data.

Tests are also updated to match outputs of nmcli commands.

[1] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/1.38.4/src/libnm-core-impl/nm-vpn-plugin-info.c#L619

* Add changelog

* Some suggested changes

* Make space stripping more flexible - works for cases without equal
  signs.
* Keep vpn.data in a test case with no spaces

* nmcli: allow any string for vpn service-type
2022-09-03 12:02:03 +02:00
Petr Lautrbach
4c52fdb9d9
seport: add local argument (#5203)
Using `local: true` users can enforce to work only with local policy
modifications. i.e.

    # Without `local`, no new modification is added when port already exists
    $ sudo ansible -m seport -a 'ports=22 state=present setype=ssh_port_t proto=tcp' localhost

    localhost | SUCCESS => {
        "changed": false,
        "ports": [
            "22"
        ],
        "proto": "tcp",
        "setype": "ssh_port_t",
        "state": "present"
    }

    $ sudo semanage port -l -C

    # With `local`, a port is always added/changed in local modification list
    $ sudo ansible -m seport -a 'ports=22 state=present setype=ssh_port_t proto=tcp local=true' localhost

    localhost | CHANGED => {
        "changed": true,
        "ports": [
            "22"
        ],
        "proto": "tcp",
        "setype": "ssh_port_t",
        "state": "present"
    }

    $ sudo semanage port -l -C
    SELinux Port Type              Proto    Port Number

    ssh_port_t                     tcp      22

    # With `local`, seport removes the port only from local modifications
    $ sudo ansible -m seport -a 'ports=22 state=absent setype=ssh_port_t proto=tcp local=true' localhost

    localhost | CHANGED => {
        "changed": true,
        "ports": [
            "22"
        ],
        "proto": "tcp",
        "setype": "ssh_port_t",
        "state": "absent"
    }

    $ sudo semanage port -l -C

    # Even though the port is still defined in system policy, the module
    # result is success as there's no port local modification
    $ sudo ansible -m seport -a 'ports=22 state=absent setype=ssh_port_t proto=tcp local=true' localhost

    localhost | SUCCESS => {
        "changed": false,
        "ports": [
            "22"
        ],
        "proto": "tcp",
        "setype": "ssh_port_t",
        "state": "absent"
    }

    # But it fails without `local` as it tries to remove port defined in
    # system policy
    $ sudo ansible -m seport -a 'ports=22 state=absent setype=ssh_port_t proto=tcp' localhost

    An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ValueError: Port tcp/22 is defined in policy, cannot be deleted
    localhost | FAILED! => {
        "changed": false,
        "msg": "ValueError: Port tcp/22 is defined in policy, cannot be deleted\n"
    }

Signed-off-by: Petr Lautrbach <plautrba@redhat.com>

Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
2022-09-03 11:53:57 +02:00
Markus Reiter
82d69bb871
Fix exception when agent argument is not specified. (#5194) 2022-08-28 12:03:27 +02:00
jixj5
766c109d47
Update redfish module for compatibility with VirtualMedia resource location (#5124)
* Update redfish module for compatibility with VirtualMedia resource location from Manager to Systems

* Add changelogs fragments for PR 5124

* Update some issue according to the suggestions

* update changelogs fragment to list new features in the minor_changes catagory

Co-authored-by: Tami YY3 Pan <panyy3@lenovo.com>
2022-08-24 21:36:35 +02:00
Tom Reeb
9f39294f50
adding nested try block for tss.py to import new Delinea library (#5151)
* adding nested try block to import delinea library

* whitespace

* Update plugins/lookup/tss.py

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

* adding changelog fragment

* Update changelogs/fragments/5151-add-delinea-support-tss-lookup.yml

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

Co-authored-by: Tom Reeb <Thomas.Reeb_e@morganlewis.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-23 21:53:06 +02:00
Felix Fontein
02d9a1de9e
Make reuse conformant (#5138)
* Add .license files.

* Add reuse test.

* Update README.

* Also remove .yaml changelog fragments.

* Add changelog fragment.

* Normalize licenses extra sanity test.

* Declare REUSE conformance.

* Update README.md
2022-08-21 08:27:01 +02:00
Michal Hybner
3c2d7eb193
dig: Fix evaluation of boolean parameters (#5129)
* Add lookup_dig tests

* Fix boolean evaluation

* Add changelog fragment

* Apply review changes

* Add license
2022-08-20 14:31:15 +02:00
Jonathan Lung
ad8965218d
Fix nsupdate when updating NS record (#5112)
* Fix nsupdate when updating NS record

* Changelog fragment

* Update changelogs/fragments/5112-fix-nsupdate-ns-entry.yaml

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

* Switch to fallback to AUTHORITY instead of using with NS type.

* Update plugins/modules/net_tools/nsupdate.py

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

* Update plugins/modules/net_tools/nsupdate.py

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

Co-authored-by: jonathan lung <lungj@heresjono.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-20 13:22:13 +02:00
Markus Reiter
0be7b6e7b9
Change Proxmox agent argument to string. (#5107)
* Change Proxmox `agent` argument to string.

* Add changelog entry.

* Pass boolean directly to `proxmoxer`.
2022-08-20 13:21:07 +02:00
Alexei Znamensky
3c960ac620
pipx: add state latest (#5105)
* pipx: add state latest

* add changelog fragment

* Update plugins/modules/packaging/language/pipx.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-18 06:44:18 +02:00
Felix Fontein
c8925058aa
Update copyright statements. (#5106) 2022-08-13 16:56:40 +02:00
Felix Fontein
a54af8909c
Fix linting errors; fix some real bugs (#5111)
* Fix linting errors.

* Fix bugs.

* Another linter error ignored.

* More fixes.

* Ignore sanity errors with older versions.

ci_complete

* Forgot to commit more changes.
2022-08-12 11:07:30 +02:00
Markus Reiter
0338eb7a7c
Fix Proxmox node, name condition. (#5108)
* Fix Proxmox `node`, `name` condition.

* Add changelog entry.
2022-08-12 14:03:57 +12:00
Alexei Znamensky
83317419d7
pipx: add required_if fo upgrade and reinstall (#5100)
* pipx: add required_if for upgrade and reinstall

* add changelog fragment
2022-08-09 10:15:51 +02:00
Felix Fontein
aab22e7f32
Add remaining copyright statements, add licenses sanity test (#5098)
* Add sanity test (currently fails).

* doc_fragments can also be non-GPLv3+.

* Replace 'Author:' by 'Copyright:' in some specific cases.

* Avoid matching string for license checkers.

* Reformulate not to throw license detection off.

* Add PSF copyright notice for plugins/module_utils/_mount.py.

* Add generic copyright notices.

* Update changelog fragment.
2022-08-08 23:23:08 +02:00
Felix Fontein
424d706f92
Fix more copyright lines, add more default copyright lines (#5095)
* Fix copyright lines.

* Add default copyright line.
2022-08-08 14:24:58 +02:00
Felix Fontein
9327b12c4d
Add more default license and copyright notices (#5087)
* Add more default license and copyright notices.

* Fix tests.

* Fix typos.

* Fix task type.

* Add URL to changelog fragment.

* Improve headers for setup_wildfly_server.
2022-08-08 08:44:19 +02:00
Alexei Znamensky
2ecaa91f68
pipx: use CmdRunner (#5085)
* pipx: use CmdRunner

* added BOTMETA entry for pipx module_utils

* add changelog fragment

* add missing line

* Update plugins/module_utils/pipx.py

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

* Update plugins/module_utils/pipx.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-08 08:02:56 +02:00
Felix Fontein
2a9fd7359f
Add more license statements (#5079)
* Add more license statements. These were modified manually incorporating existing data.

* Remove accidentally added line.
2022-08-07 13:37:23 +02:00
Mike Moerk
6062ae8fae
WDC Redfish support for chassis indicator LED toggling. (#5059)
* WDC Redfish support for chassis indicator LED toggling.

* Added changelog fragment.

* Apply suggestions from code review

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-07 09:56:07 +02:00
Felix Fontein
496bf27b5c
Fix copyright lines (make sure 'Copyright' is there). (#5083) 2022-08-05 22:12:10 +02:00
Felix Fontein
68e7e52557
Add simple license headers, not completely at top. (#5080) 2022-08-05 21:31:34 +02:00
Felix Fontein
fa6c009ff0
Make sure all files have trailing newline (#5076)
* Make sure all files have trailing newline.

* Adjust tests.
2022-08-05 21:08:41 +02:00
Felix Fontein
123c7efe5e
Move licenses to LICENSES/, run add-license.py, add LICENSES/MIT.txt (#5065)
* Move licenses to LICENSES/, run add-license.py, add LICENSES/MIT.txt.

* Replace 'Copyright:' with 'Copyright'

sed -i 's|Copyright:\(.*\)|Copyright\1|' $(rg -l 'Copyright:')

Co-authored-by: Maxwell G <gotmax@e.email>
2022-08-05 12:28:29 +02:00
Alexei Znamensky
5933d28dc4
xfconf: add command output to results (#5037)
* xfconf: add command output to results

* add changelog fragment

* add docs for return value cmd

* Update plugins/modules/system/xfconf.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-01 11:21:06 +02:00
Jonathan Lung
e8e6b9bbd7
lastpass lookup: use config manager, improve documentation (#5022)
* LastPass lookup: use config manager, improve documentation

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

* Update changelogs/fragments/5022-lastpass-lookup-cleanup.yml

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

Co-authored-by: jonathan lung <lungj@heresjono.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-01 09:36:07 +02:00
Dishant Pandya
88a3daf2ec
Fix: Add user-agent header to allow request through WAF with bot protection (#5024)
* Fix: Add user agent header to allow request through CDN/WAF with bot protection

* upate doc-fragment

* move http_agent variable assignment

* set http_agent param for all Keycloak API Requests

* Update plugins/doc_fragments/keycloak.py

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

* Update changelogs/fragments/5023-http-agent-param-keycloak.yml

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

* fix formatting

* Update plugins/doc_fragments/keycloak.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-01 09:35:05 +02:00
Richard Tuin
3fe9592cf1
Slack: Add support for (some) groups (#5019)
* Slack: Add support for (some) groups

Some of the older private channels in the workspace I'm working in have channel ID's starting with `G0` and `GF` and this resulted to false positive `channel_not_found` errors.
I've added these prefixes to the list to maintain as much backwards compatibility as possible.

Ideally the auto-prefix of the channel name with `#` is dropped entirely, given the Channel ID's have become more dominant in the Slack API over the past years.

* Add changelog fragment for slack channel prefix fix

* Update changelogs/fragments/5019-slack-support-more-groups.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-07-31 23:35:07 +02:00
PKehnel
c273498a03
Module listen ports facts extend output (#4953)
* Initial Rework of netstat and ss to include additional information.
State, foreign address, process.

* Fixed sanity tests. Python 2 compatible code. pylint errors resolved.

* Sanity tests. ss_parse fix minor error I created before.

* Rename variable for clarity

* Python2 rsplit takes no keyword argument. -> remove keyword argument

* Generic improvments for split_pid_name. Added changelog

* Sanity Test (no type hints for python2.7)

* add include_non_listening param. Add param to test. Add documentation. Only return state and foreign_address when include_non_listening

* Update changelogs/fragments/4953-listen-ports-facts-extend-output.yaml

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

* Add info to changelog fragment. Clarify documentation.

* The case where we have multiple entries in pids for udp eg: users:(("rpcbind",pid=733,fd=5),("systemd",pid=1,fd=30)) is not in the tests. So roll back to previous approach where this is covered. Fix wrong if condition for include_non_listening.

* Rewrite documentation and formatting.

* Last small documentation adjustments.

* Update parameters to match description.

* added test cases to check if include_non_listening is set to no by default. And test if ports and foreign_address exists if set to yes

* undo rename from address to local_address -> breaking change

* Replace choice with bool, as it is the correct fit here

* nestat distinguishes between tcp6 and tcp output should always be tcp

* Minor adjustments in the docs (no -> false, is set to yes -> true)

Co-authored-by: Paul-Kehnel <paul.kehnel@ocean.ibm.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-07-31 22:12:38 +02:00
Minei3oat
9f3841703f
Pacman: Add support for install reason (#4956)
* Pacman: Add support for setting install reason

* Improved description

* Fix documentation

* Add changelog fragment

* Use source for installation

* Get all reasons at once

* Removed default for reason

* Added version info to documentation

* Fix NameError

* Moved determination of reason to _build_inventory

* Fix duplication and sanity errors

* adjust tests for changed inventory

* Documentation: remove empty default for reason

* mention packages with changed reason in exit params/info

* Added integration tests for reason and reason_for

Inspired by the integration tests for url packages

* Correct indentation

* Fix indentation

* Also sort changed packages in normal mode

* Also sort result in unit test

* Apply suggestions from code review

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-07-31 22:10:49 +02:00
wilfriedroset
d214f49be7
consul: add support for session TTL (#4996)
Signed-off-by: Wilfried Roset <wilfriedroset@users.noreply.github.com>
2022-07-31 13:17:43 +02:00
Alexei Znamensky
aba089369e
mh base: add verbosity() property (#5035)
* mh base: add verbosity property

* add changelog fragment
2022-07-31 11:28:17 +02:00
Sylvia van Os
3eb29eb4b6
Fix returnall for gopass (#5027)
* Fix returnall for gopass

Gopass was always given the --password flag, despite there being no need for this.

* Add changelog fragment

Co-authored-by: Sylvia van Os <sylvia.van.os@politie.nl>
2022-07-29 14:24:15 +02:00
Felix Fontein
c64dd16f1c Fix changelog fragment. 2022-07-29 12:09:10 +02:00
Alexei Znamensky
f544aac024
gconftool2: deprecate state get (#4778)
* gconftool2: deprecate state get

* added changelog fragment

* Update plugins/modules/system/gconftool2.py

* Update plugins/modules/system/gconftool2.py
2022-07-29 11:38:37 +02:00
Felix Fontein
9290381bea
xfconf: fix setting of boolean values (#5007) 2022-07-27 07:42:25 +02:00
CactiChameleon9
be0e47bfdc
Apk: add support for a custom world file (#4976)
* Apk: add support for a custom world file

* Apk: Add changelog fragment for custom world file
2022-07-26 11:14:17 +02:00
Raul Gabriel Verdi
a2677fd051
Expose unredirected_headers on maven_artifact (#4812)
* Expose unredirected_headers to module

In some cases, when the initial request returns a redirect and we want
to follow it to get the artifact, we might not want to include certain
headers in the redirection request. Specially headers like
Authorization and Cookies.
Or perhaps the redirect server returns a 400 because it included some
unexpected headers.
Fetch url already supports this feature, but it was being shadowed by
maven_artifact. In here we just expose it.

* Fix Linting errors

* Applied Comments

 - Specified version added
 - Changed description of unredirected_headers

* Check for ansible version

If it's 2.11 or older, we ignore unredirected_headers, otherwise we use
it, as fetch_url has them

* Applied comments

- Removed duplicated code in the call of fetch_url. Used kwargs instead
- Added check if unredirected_params is not empty and the fetch_url
  function does not support it
- Changed function that checks for ansible version
- Removed unused import

* Remove 2.11 breaking change

Made default only for ansible-core version 2.12 and above, but for keep
it empty for ansible-core version 2.11 and below.
Also include the following changes:
  - change doc to use C() on the function description
  - changed doc to use ansible-core instead of Ansible

* Changes in description for readability

* Add changelog fragment

* Change description changelog fragment
2022-07-24 12:09:58 +02:00
Alexei Znamensky
31ef6c914b
xfconf and xfconf_info: use do_raise (#4975)
* remove redundant XfConfException class

* adjusted indentation in the documentaiton blocks

* add changelog fragment
2022-07-24 12:09:24 +02:00
Benjamin
2662bc881f
Introduce dig lookup argument fail_on_error (#4973)
with default False for backwards compatibility.

Allows fail-fast behavior on lookup failures instead of returning strings and continuing.
2022-07-24 12:08:47 +02:00
Sargun Vohra
e2426707e2
Fix keyring_info when using keyring library (#4964)
* Fix keyring_info when using keyring library

This line used to always clobber the passphrase retrieved via the `keyring` library, making it useless on everything except gnome-keyring. After this change, it'll only use the alternate method if the default one didn't work.

* delete whitespace

* add changelog fragment

* Update changelogs/fragments/4964-fix-keyring-info.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-07-24 12:08:12 +02:00
Minei3oat
788cfb624a
Pacman: Fix name of URL packages (#4959)
* Strip downloading... of unseen URLs

* Added changelog fragment

* Added integration tests for reason and reason_for

Inspired by the integration tests for url packages

* Revert "Added integration tests for reason and reason_for"

This reverts commit f60d92f0d7.

Accidentally commited to the wrong branch.
2022-07-21 13:58:03 +02:00
miyuk
c57204f9a9
proxmox module_utils: fix get_vm int parse handling (#4945)
* add int parse handling

* Revert "add int parse handling"

This reverts commit db2aac4254.

* fix: vmid check if state is absent

* add changelogs fragments

* Update changelogs/fragments/4945-fix-get_vm-int-parse-handling.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-07-21 07:19:44 +02:00
Sylvia van Os
c31e6413f2
Fix path detection for gopass (#4955)
* Fix path detection for gopass

As per fc8c9a2286/docs/features.md (initializing-a-password-store), gopass defaults to ~/.local/share/gopass/stores/root for its password store root location.

However, the user can also override this, and this will be stored in the gopass config file (ed7451678c/docs/config.md (configuration-options)).

This patch ensures that the config setting in gopass is respected, falling back to the default gopass path. pass' behaviour remains unchanged.

* Formatting improvements

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

* Add changelog fragment

* Formatting improvement

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

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-07-21 07:19:31 +02:00
ube
aa03c71267
proxmox inventory: fix for agent enabled (#4910)
* Update proxmox.py

* Forgot a debug print.

* pep

* Check if int, old school way.

* pep, once again.

* Create 4910-fix-for-agent-enabled.yml

* Must check the first listentry for enabled=1

* Update changelogs/fragments/4910-fix-for-agent-enabled.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-07-12 11:03:13 +02:00
Louis Seubert
35ddf31b5f
added password prompt support for machinectl (#4849)
* added password prompt support for machinectl

* include review comments

This includes the review comments as well as changelog fragment. This also gives more information about the polkit rule.

* fix yaml doc with leftover bracket

* include review comments 2

* move regex compile to global scope
2022-07-08 23:11:14 +02:00
Evgeni Golov
a5ff53f2ae
allow configuring opentelementry callback via config file (#4916)
this is especially useful for the `enable_from_environment` option, as
this allows to set a default for the whole project, instead of relying
on everyone setting the environment variable
2022-07-07 21:51:04 +02:00
Teddy Caddy
9a928d5ffb
Fix syntax in rax_clb_nodes that breaks in Python3 (#4933)
* Use syntax that works in both Python 2 and 3 when iterating through a
    dict that's going to be mutated during iteration
  * Fixes `dictionary changed size during iteration` error
  * Fixes #4932
2022-07-07 21:49:45 +02:00
antonc42
905f9ec399
fix lxd connection plugin inventory_hostname (#4912)
* fixes lxd connection plugin issue #4886

remote_addr value was set to literal string 'inventory_hostname' instead
of the value for inventory_hostname variable. solution found in PR
ansible/ansible#77894

* changelog fragment - bugfix - lxd connection plugin

* correct changelog fragment

* Update changelogs/fragments/4886-fix-lxd-inventory-hostname.yml

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

* replace _host instance variable with calls to get 'remote_addr' option

suggested by felixfontein

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-07-07 21:49:10 +02:00
andrii-zakurenyi
7ffa2b525c
Do not ignore tld option in DSV lookup plugin (#4911)
* Do not ignore tld option in DSV lookup plugin

* add changelog fragment

* Update changelogs/fragments/4911-dsv-honor-tld-option.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-07-04 20:25:34 +02:00
Jacob Yundt
f60d12cf2d
Fix GetChassisPower when multiple chassis are present (#4902)
* Fix GetChassisPower when multiple chassis are present

When multiple chassis are present, and one or more of those chassis do _not_
report power information, the GetChassisPower command will fail. To address
that, only report a failure if _all_ of the Chassis objects lack power
power reporting functionality.

Fixes #4901

* Update changelogs/fragments/4901-fix-redfish-chassispower.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-06-30 20:36:01 +02:00
Jacob Yundt
93dcd3f54d
Add GetFirmwareVersion command to redfish_info (#4900)
* Add GetManagerInventory command to redfish_info

Adding GetManagerInventory command to redfish_info, similar to
GetSystemInventory to report Manager specific information like:
- FirmwareVersion
- Model
- ManagerType

Fixes #4899

* Update changelogs/fragments/4899-add-GetManagerInventory-for-redfish_info.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-06-30 20:35:35 +02:00
Álvaro García Jaén
265c052c27
Fix command variable usage in CmdRunner (#4903)
* Fix command variable usage

* Add changelog fragment for cmd-runner bugfix (#4903)
2022-06-30 07:08:55 +02:00
Jon Ellis
97c72f88b7
Sudoers validate (#4794)
* Use visudo to validate sudoers rules before use

* Replace use of subprocess.Popen with module.run_command

* Switch out apt for package

* Check file mode when verifying file to determine whether something needs to change

* Only install sudo package for debian and redhat environments (when testing)

* Attempt to install sudo on FreeBSD too

* Try just installing sudo for non-darwin machines

* Don't validate file ownership

* Attempt to install sudo on all platforms

* Revert "Attempt to install sudo on all platforms"

This reverts commit b9562a8916.

* Remove file permissions changes from this PR

* Add changelog fragment for 4794 sudoers validation

* Add option to control when sudoers validation is used

* Update changelog fragment

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

* Add version_added to validation property

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

* Also validate failed sudoers validation error message

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

* Make visudo not executable instead of trying to delete it

* Update edge case validation

* Write invalid sudoers file to alternative path to avoid breaking sudo

* Don't try to remove or otherwise modify visudo on Darwin

* Update plugins/modules/system/sudoers.py

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

* Remove trailing extra empty line to appease sanity checker

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-06-21 12:41:24 +02:00
FRUCHTiii
5e57d2af0a
redfish_command: VirtualMediaInsert does not work with Supermicro (#4839)
* bugfix virtual media support for supermicro hardware

* Added Changelog for PR4839
2022-06-20 19:13:31 +02:00
s-hamann
44e21dd407
sudoers: fix handling of state: absent (#4852) (#4853)
* sudoers: fix handling of state: absent (#4852)

* typo fixes
2022-06-19 15:34:24 +02:00
Felix Fontein
dcdfc9c413
Add PSF-license.txt for plugins/module_utils/_mount.py (#4847)
* Add PSF-license.txt for plugins/module_utils/_mount.py.

* Move other licenses to licenses/.

* Revert "Move other licenses to licenses/."

This reverts commit eab4209889.
2022-06-17 08:21:34 +02:00
grembo
006f3bfa89
passwordstore: Make compatible with shims (#4780)
* passwordstore: Make compatible with shims, add backend config

This allows using the passwordstore plugin with scripts that wrap other
password managers. Also adds an explicit configuration (`backend` in
`ini` and `passwordstore_backend` in `vars`) to set the backend to `pass`
(the default) or `gopass`, which allows using gopass as the backend
without the need of a wrapper script. Please be aware that gopass
support is currently limited, but will work for basic operations.

Includes integrations tests.

Resolves #4766

* Apply suggestions from code review
2022-06-15 08:08:04 +02:00
Alexei Znamensky
739ca737f1
cmd_runner: add __call__ method to invoke context (#4791)
* cmd_runner: add __call__ method to invoke context

* change xfconf to use the callable form

* add changelog fragment

* Update changelogs/fragments/4791-cmd-runner-callable.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-06-15 08:06:26 +02:00
Felix Fontein
84d8ca9234
Fix alternatives module (#4836)
* Only pass subcommands when they are specified as module arguments.

* When 'subcommands' is specified, 'link' must be given for every subcommand.

* Extend subcommand tests.
2022-06-14 16:02:31 +02:00