use dict comprehension in plugins, part 3 (#8833)
* use dict comprehension in plugins, part 3
* add changelog frag
(cherry picked from commit 26df6c7657)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
use dict comprehension in plugins, part 2 (#8822)
* use dict comprehension in plugins
* add changelog frag
(cherry picked from commit 7e978c77b4)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
pipx/pipx_info: add parameter `global` (#8793)
* pipx/pipx_info: add new parameters
* add test for --global, refactor int test main file
* ensure initial state of test
* ensure PATH includes /usr/local/bin
* ensure PATH includes /usr/local/bin for entire block
* ensure minimum version of pip
* ensure pipx 1.6.0 is installed
* push recommendation for pipx 1.7.0 instead of 1.6.0
* add changelog frag
* add deprecatons to changelog frag
* add deprecatons to changelog frag, better
* Update changelogs/fragments/8793-pipx-global.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update changelogs/fragments/8793-pipx-global.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 9c9c4cbc3e)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
MH deco: minor refactor (#8766)
* MH deco: minor refactor
* adjustments and improvement in test
* sanity fix
* use func.__self__
* simplify use of self
* add changelog frag
(cherry picked from commit c84fb5577b)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Fix pylint and pep8 issues exposed by latest ansible-core's ansible-test sanity checks (#8720)
* Remove bad whitespace.
* 'Fixing' various used-before-assignment issues that pylint flagged.
(cherry picked from commit 9a16eaf9ba)
Co-authored-by: Felix Fontein <felix@fontein.de>
Add a keycloak module to query keys metadata (#8605)
* feat(keycloak): module to query keys metadata
* chore: add thomasbach-dev as maintainer in team_keycloak
* test: adding a unit test for keycloak_real_keys_metadata_info module
* fixup! feat(keycloak): module to query keys metadata
(cherry picked from commit 229ed6dad9)
Co-authored-by: Thomas Bach <63091663+thomasbach-dev@users.noreply.github.com>
homebrew: Add support for services functions (#8329)
* Homebrew: Add support for services functions
Fixes#8286.
Add a homebrew.services module for starting and stopping services
that are attached to homebrew packages.
* Address python version compatibility
* Addressing reviewer comments
* Addressing sanity logs
* Address str format issues
* Fixing Python 2.7 syntax issues
* Test alias, BOTMETA, grammar
* Attempt to fix brew in tests
* Address comments by russoz
* Fixing more dumb typos
* Actually uninstall black
* Update version_added in plugins/modules/homebrew_services.py
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 2963004991)
Co-authored-by: Kit Ham <kitizz.devside@gmail.com>
redfish_utils: fix language check (#8613)
* redfish_utils: fix language check
* add fragment file
* typo
* improve words
* improve words based on suggestion
---------
Co-authored-by: Mike Koreneff <mkoreneff@hudson-trading.com>
(cherry picked from commit ca8ecb1df1)
Co-authored-by: Mike Koreneff <mkoreneff@users.noreply.github.com>
Enable Custom Cipher Selection for Redfish Modules (#8533)
* Enable custom cipher selection for redfish modules
Signed-off-by: David Ehrman <dlehrman@liberty.edu>
* Add changelog fragment
Signed-off-by: David Ehrman <dlehrman@liberty.edu>
* Added version_added to the ciphers option in redfish modules
Signed-off-by: David Ehrman <dlehrman@liberty.edu>
---------
Signed-off-by: David Ehrman <dlehrman@liberty.edu>
(cherry picked from commit 0d50131d5e)
Co-authored-by: dlehrman <dlehrman@users.noreply.github.com>
Consul implement agent service and check (#7989)
* Implement agent service and check (#7987)
* implement update of service and check
* update tests
update documentation
* update documentation
* add consul_agent_check/service to action_groups
check if unique_identifier of name is in params to get object
add suggested improvements
* update sanity
* fix sanity issues
update documentation
* fix naming
* fix naming
check if response_data has data
* fix sanity extra-docs
* add as ignore maintainer in BOTMETA.yml
update version_added to 8.4
* fix sanity
* add to maintainers
* Update plugins/modules/consul_agent_check.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/consul_agent_check.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/consul_agent_check.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* update version_added
* if create and update return no object as result we read the object again
* get_first_appearing_identifier check the params for the given identifier and return it to simplify id vs name
* add unique_identifiers as a new property and a method to decide which identifier should be used
* fix sanity
* add self to team consul
remove params with no values
add operational_attributes that inherited classes can set them
get identifier value from object
* fix sanity
fix test
* remove the possibility to add checks with consul_agent_check.
check if service has changed
* remove tests for idempotency check because for checks it is not possible
* remove unique_identifier from consul.py
change unique_identifier to unique_identifiers
* get id from params
* Revert "remove unique_identifier from consul.py"
This reverts commit a4f0d0220dd23e95871914b152c25ff352097a2c.
* update version to 8.5
* Revert "Revert "remove unique_identifier from consul.py""
This reverts commit d2c35cf04c8aaf5f0175d772f862a796e22e35d4.
* update description
update test
* fix sanity tests
* fix sanity tests
* update documentation for agent_check
* fix line length
* add documentation
* fix sanity
* simplified check for Tcp
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
* check duration with regex
* fix
* update documentation
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
(cherry picked from commit 03966624ba)
Co-authored-by: Ilgmi <michael.ilg@mailbox.org>
#8440 Allow for API Port to be specified when using proxmox_kvm (#8441)
* added api_port
* added changelog fragments for #8440
* api_port minor changes
- Added documentation on api_port
- Fixed multiple spaces after operator
- Switched from str to int
* Update changelogs/fragments/8440-allow-api-port-specification.yaml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update changelogs/fragments/8440-allow-api-port-specification.yaml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/doc_fragments/proxmox.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/doc_fragments/proxmox.py
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit d2d7deb4ec)
Co-authored-by: Thomas Gouverneur <thomas@espix.net>
Redfish: Add options to check the availability of the service (#8434)
* Redfish: Add options to check the availability of the service
Signed-off-by: Mike Raineri <michael.raineri@dell.com>
* Updates based on review feedback
Signed-off-by: Mike Raineri <michael.raineri@dell.com>
* Updated comment to reflect changed behavior
Signed-off-by: Mike Raineri <michael.raineri@dell.com>
* Added changelog fragments
Signed-off-by: Mike Raineri <michael.raineri@dell.com>
* Update changelogs/fragments/8051-Redfish-Wait-For-Service.yml
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_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_command.py
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Signed-off-by: Mike Raineri <michael.raineri@dell.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 961767e2dd)
Co-authored-by: Mike Raineri <mraineri@gmail.com>
multiple modules: use new vardict in module (#8411)
* use new vardict in module
* add changelog frag
* Update changelogs/fragments/8411-locale-gen-vardict.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* set use_old_vardict to false in snap
* set use_old_vardict to false in cpanm
* set use_old_vardict to false in django mod helper
* set use_old_vardict to false in gconftool2_info
* set use_old_vardict to false in kernel_blacklist
* set use_old_vardict to false in mksysb
* set use_old_vardict to false in pipx_info
* set use_old_vardict to false in snap_alias
* update chglog frag
* fix typo
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit ec886203fc)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
* Added parameter to select Content-Type when accessing the Rundeck API
* Removed autogenerated file
* Fixed missing yml extension
* Updated changelog text better describe what has happened
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Nils Brinkmann <nils.brinkmann@rheinmetall.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
* gomebrew: Move repeated logic from homebrew modules into module_utils
Fixes#8323.
* ghangelog + unit test improvement
* Update changelogs/fragments/8323-refactor-homebrew-logic-module-utils.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
* change MH to use the module_utils.vardict.VarDict
* remove VarsMixin from superclasses of MH
* bump vardict deprecation to 11.0.0 + add old/new vardict selection in MH
* improve backawards compatibility
* improve backawards compatibility
* use new vardict in some modules, make adjustments
* add changelog frag
* adjustment after rebase
puppet_utils: Add option to set LANG for puppet execution
Add option `environment_lang` to force the LANG when executing the
puppet agent. The default is the `C` LANG
* Redfish: add Multipart bool return value to FirmwareUpdateCapabilities
Fixes#8194
Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
* Update changelogs/fragments/8194-redfish-add-multipart-to-capabilities.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix(modules/gitlab_runner): Use correct argument to list all runners
python-gitlab 4.0.0 removed support for the `as_list=False` parameter.
This functionality is now available as `iterator=True`.
Without this change, the module actually only retrieves the first
20 results, which can lead to non-idempotent behavior, such as
registering a runner again.
* Add changelog entry (#7790)
* gitlab_runner: Check python-gitlab version when listing runners
* gitlab: Add list_all_kwargs variable to module_utils
* refactor(gitlab modules): use list_all_kwargs where it helps (#7790)
I did not change every instance of all=True or all=False, only those
which could obviously benefit from simplifying:
* Code using `all=True` but then searching for any items that match a
condition (no need to collect the full list).
* Code that basically reimplements `all=True` with manual pagination.
(These could be changed to `all=True`, but `list_all_kwargs` also
sets per_page to 100, to gather data faster.)
* gitlab_instance_variable: Use list_all_kwargs
* Add new changelog entry for gitlab module changes (#7790)
* Fix errors in hpe specific get methods
* corrects reference to non existent `self.chassis_uri_list` to
`self.chassis_uris`
* corrects syntactically incorrect dereferences
* removes an uneccessary variable assignment to `chassis_uri_list`
in `get_psu_inventory` method
* adds changelog fragment for above indicating fix of issue #7951
* Update changelog.
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
* Added handling for 204 No Content in some circumstances
Signed-off-by: Mike Raineri <michael.raineri@dell.com>
* Correcting gzip usage; open_url does the decompression automatically
Signed-off-by: Mike Raineri <michael.raineri@dell.com>
* Changelog fragment
Signed-off-by: Mike Raineri <michael.raineri@dell.com>
* Removed imports no longer used
Signed-off-by: Mike Raineri <michael.raineri@dell.com>
* Updated data unpacking to dynamically check ansible-core version and response headers to see if gzip decompression is needed
Signed-off-by: Mike Raineri <michael.raineri@dell.com>
---------
Signed-off-by: Mike Raineri <michael.raineri@dell.com>
Assume that if a string of digits occurs between curly braces anywhere
in the first component of the DN, that this is an order number. The
sequence does not necessarily have to occur after an equals sign.
* gitlab project label first commit
* fixes from CI run
* fixing some sanity test
* sanity checks, removing typing
* remove default for required field
* fix indentation
* improving test set
* fixes to pass test set
* reuse compliancy
* fix sanity checks
* fix: method returns group, not project
* refactor: start adding group, test still pass
* updated module and tests to handle group labels
* update name to remove 'project'
* removing default
* typo
* generic name for returned dict
* returns also label object from library invocation
* remove unused var, updated doc
* fix output object name
* version_added
Co-authored-by: Felix Fontein <felix@fontein.de>
* Remove python 2.7
Co-authored-by: Felix Fontein <felix@fontein.de>
* Missing dot
Co-authored-by: Felix Fontein <felix@fontein.de>
* Remove version_added
Co-authored-by: Felix Fontein <felix@fontein.de>
* Remove useless doc
Co-authored-by: Felix Fontein <felix@fontein.de>
* Color is a string
* Fixes from recent PR comments.
---------
Co-authored-by: Felix Fontein <felix@fontein.de>