* pkgng: join package list into one command
Change the pkgng module so all packages being
installed (or upgraded) are acted on in one
command (per action). This will make installs
and upgrades a bit faster, because pkg will be
invoked fewer times per module run. More important,
module actions will be more atomic, making it less
likely that some packages are acted on because they
appear earlier in the argument list.
This change also improves the status reporting of
packages acted on, specifying the number of packages
for each action (install or upgrade).
* pkgng: make upgrade check lazily evaluated
Make upgrade_available an inner function so that the
if statement that checks whether installed packages
are up-to-date only runs the upgrade check on packages
that are already installed. This gets lazily evaluated
because of boolean operator short-circuiting:
https://docs.python.org/3.8/library/stdtypes.html#boolean-operations-and-or-not
Previously, the module would always check for upgrades,
even for not-installed packages, when running with
`state=latest`.
* pkgng: add changelog fragment
* pkgng: Apply changelog suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* pkgng: resolve pep8 style issue
Remove inline function. It's purpose would be confusing for
future maintainers, and someone refactoring it to a variable,
with good intentions, would introduce a performance regression.
Including the `query_update()` call in the if expression makes
the intent more legible and still ensures lazy evaluation of the
function call if the first `and` is `False`.
* pkgng: Fix changelog fragment syntax issue
Need to escape quotes so YAML doesn't eat them
Co-authored-by: Felix Fontein <felix@fontein.de>
* pkgng: Improve output message English grammar
Make word "package" plural only if reporting on more than one package
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* If repo option points to .repo file, download for later parsing
* Parse downloaded .repo file content (ini format)
* Validate downloaded file, map values to repodata, workaround to ignore old .repo related code
* Integration Test adjusted to install python package 'requests' first
* Revert "Integration Test adjusted to install python package 'requests' first"
This reverts commit 0d18352c2238d098831ba6d59b66e731fa8f0cd9.
Not allowed to introduce new dependencies at this point, module_utils usage required
* Remove python 'requests' dependency, using 'fetch_url' and 'to_text' from 'ansible.module_utils' instead
* Prefer alias (name) if given instead repo (url)
* If gpgkey was given in .repo file ensure key get automatically imported
* ConfigParser Import made Python2 compatible
* New .repo code moved below existing run-time parameters checks to keep previous logic
* Obsolete workaround removed
* two pylint/pep8 errors fixed
* name added to autorefresh assert
* Missing assert for 'Delete test repo' added
* name added to priority option assert
* name added to check repo is updated by url assert
* name added to check repo is updated by name assert
* name added to check add a repo by releasever assert
* name added to check remove added repo assert
* name added to check add a repo by basearch assert
* name added to check remove added repo #2 assert
* Bugfix to avoid 'KeyError' Exception in if statements
* Refactoring of configparser related code, usage of module_utils, py2 compatibility
* Removal of some leftover from earlier testing
* Integration tests for add/remove repositories by url to .repo file added
* Additional name added to list of test repos that has to be removed
* Test added to verify cleanup of local .repo file after removal via zypper
* Changelog fragment related to PR #3474 added
* yamllint error resolved
* Refactoring to reduce indentation and removal of else statements
* Integration tests added for loading .repo file from local path
* Test .repo file added
* Dependency to setup_remote_tmp_dir added
* New entry added to 'remove repositories added during test'
* Support for .repo file from local path
* Changelog: Ref to https://github.com/ansible-collections/community.general/issues/3466 added
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* [ufw] Insert or delete biased when deletion enabled - as for append or delete.
* [ufw] Insert or delete biased when deletion enabled - as for append or delete.
* [ufw] Insert or delete biased when deletion enabled - as for append or delete.
* [ufw] Insert or delete biased when deletion enabled - as for append or delete.
* [ufw] Insert or delete biased when deletion enabled - as for append or delete.
* [ufw] Insert or delete biased when deletion enabled - as for append or delete.
* [ufw] Insert or delete biased when deletion enabled - as for append or delete.
* [ufw] Insert or delete biased when deletion enabled - as for append or delete.
* [opentelemetry][callback] add option to support enabling plugin in the CI only
* [opentelemetry][callback] add changelog fragment
* Apply suggestions from code review
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
* [opentelemetry][callback] use enable_from_environment
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* [opentelemetry] ensure the value is true otherwise the plugin is not enabled
* [opentelemetry][changelog] update entry with the new option
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
* pipx - new module
* using python instead of python3
* removed ensure_path as it is unused
* ensuring we are running the same python as Ansible
* changed the last solution to adding a pipx_path parameter to the module, with a sensible default
* added docs for the new parameter
* changed param name to executable, and customized it for Darwin
* use executable if passed, otherwise use python -m pipx
* minor update
* added examples
* Update plugins/modules/packaging/language/pipx.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/packaging/language/pipx.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/packaging/language/pipx.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* tests names 324 -> 3.24.0
* ensure tox is uninstalled by the beginning of the test
* Renamed option+suggestions from PR
* improved idempotency
* fixed sanity
* fixed test
Co-authored-by: Felix Fontein <felix@fontein.de>
* Fix: gitlab_deploy_key idempotency
The module was not retrieving all the deploy keys leading to non
idempotency on projects with multiple deploy keys.
SEE: https://python-gitlab.readthedocs.io/en/stable/api-usage.html#pagination
* Update changelogs/fragments/3473-gitlab_deploy_key-fix_idempotency.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Jonathan Piron <jonathanpiron@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Started creating Unit tests for Proxmox Tasks module
* Tried really hard to get the mock to work
* unit tests for the module
* Fixed symslink and permissions
* Suggested changes and more unit tests
* Fixed isFalse
* Apply suggestions from code review
* Update plugins/modules/cloud/misc/proxmox_tasks_info.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* OrderedDict has been added to the Python stdlib since version 2.7
* Docs: cosmetic change in the python lib
* See https://github.com/ansible/ansible/issues/75726
* Add changelog fragment
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Copy the permissions along with file for jboss module
Issue: The deployment file is copied with file content only. The file
permission is set to 440 and belongs to root user. When the
JBossI(Wildfly) server is running under non root account, it can't read
the deployment file.
With is fix, the correct permission can be set from previous task for JBoss
server to pickup the deployment file.
* Update changelogs/fragments/3426-copy-permissions-along-with-file-for-jboss-module.yml
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
* Updated nmcli.py
Amended the routing-rules4 values as list. By this we could add the entries for "routing_rules4" in the form of a list .
* Update nmcli.py
Fixed typo in line #1701
* 3395-nmcli-needs-type.yml
routing_rules4 module argument is currently accepting only string elements. In order to accept multiple values, amended the type of routing_rules4 as list.
* nmcli: amended the routing-rules4 key values as list
routing_rules4 module argument is currently accepting only string elements. In the case of adding multiple entries to routing_rules4, we need to accept values as list.
* Added 3401-nmcli-needs-type.yml
routing_rules4 module argument is currently accepting only string elements. In the case of adding multiple entries to routing_rules4, we need to accept values as lists
* Amended type to 'minor_changes'
Amended type to 'minor_changes' from 'bug_fixes'
* routing_rules4 to a list of element str
nmcli.py - routing_rules4 to a list of element str
* Update changelogs/fragments/3401-nmcli-needs-type.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* nmcli: allow routing-rules4 key values as list
* nmcli: amended the routing-rules4 key values as list
* nmcli: amended the routing-rules4 key values as list
* nmcli: amended the routing-rules4 key values as list
* test_nmcli: amended whitespaces
* Update 3401-nmcli-needs-type.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Added OpenNebula inventory plugin
Signed-off-by: Kristián Feldsam <feldsam@gmail.com>
* Apply suggestions from code review
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* Removed matching inventory yaml files ending with "one"
Too general word
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* Apply suggestions from code review
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Signed-off-by: Kristian Feldsam <feldsam@gmail.com>
* Added BOTMETA
Signed-off-by: Kristian Feldsam <feldsam@gmail.com>
* Moved import
Signed-off-by: Kristian Feldsam <feldsam@gmail.com>
* Fix indentation problem
Signed-off-by: Kristian Feldsam <feldsam@gmail.com>
* Added group_by_labels, refactored so can be unit tested
Signed-off-by: Kristian Feldsam <feldsam@gmail.com>
* Added unit tests
Signed-off-by: Kristian Feldsam <feldsam@gmail.com>
* Removed blank line
Signed-off-by: Kristian Feldsam <feldsam@gmail.com>
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
* enable deprecate message for ignore_volatile_options
* fix E128
* add frament 3429
* remove default value and modify the resulting checks
spelling fixes
bump version for deprecated messge
* fix spelling and depricated version
Co-authored-by: Frank Dornheim <“dornheim@posteo.de@users.noreply.github.com”>
* chore: add deprecation warning
* chore: add deprecation message, version and collection
* chore: add changelog fragment
* docs: add deprecation info
* fix: max line length and whitespace
* fix continuation line under-indented
* Update changelogs/fragments/3451-gitlab-group-member-deprecate-name-and-path.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/source_control/gitlab/gitlab_group_members.py
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix: return correct group id
match only full_path or name
* chore: add changelog fragment
* fix: indentation multiple of four
* refactor: use two loops
* fix: typo of group id
* fix: changelog fragment
* Fix diff mode when updating authentication flow with keycloak_authentication module
* Update documentation of create_or_update_executions function (return tuple instead of dict)
* Fix: Update requirement when new exex created
* Add changelog fragment
* Update changelogs/fragments/3330-bugfix-keycloak-authentication-flow-requirements-not-set-correctly.yml.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update changelogs/fragments/3330-bugfix-keycloak-authentication-flow-requirements-not-set-correctly.yml.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Edit requirement of sublow
Co-authored-by: Felix Fontein <felix@fontein.de>
* Adding capability to specify ehlo hostname
* Fixing default for ehlohost
the CI did not like "None" as default in the documentation,
judging from the rest of the definitions omitting that seems to be right
* Update plugins/modules/notification/mail.py
Proper spelling in documentation
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
* Adding Changelog Fragment
* Update changelogs/fragments/3425-mail_add_configurable_ehlo_hostname.yml
Proper phrasing in changelog
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
* integration-test for ehlohost parameter
* proper description, increased async-time
changed body of ehlohost-mail to reflect ehlohost
increased async from 30 to 45 as CI failed because
smtp was already down.
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
* do not ignore volatile - fix#2466
* remove unnecessary checks
* fix ansible-tests sanity
* fix access to the option: ignore_volatile_options
* add fragment
* fix quotation marks error
* fix review findings
* fix sanity error
* fix description - in yaml examples use true not True
comment out the deprecate message
* remove "default=True" at ignore_volatile_options
fix spelling
* fix sanity error that ignore_volatile_options have no default value
* undo changes. add defaut value and remove keyword at dict.get()
* fix sanity error
* small spelling fixes
* change text for fragment
* Fix description sentence.
Co-authored-by: Frank Dornheim <“dornheim@posteo.de@users.noreply.github.com”>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Added redis_set module
Added redis_set module and unit tests for the new module.
Applied suggested changes and removed redis_del in favor of state
option.
Also added redis utility class that handles connection.
* Typos, added version and BOTMETA
* Fixed import error checking
* Fixed Unit tests
* Docfix and return consistency
* Added Check Mode
* Update plugins/modules/database/misc/redis_data.py
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* kernel_blacklist - revamped the module
* file default and setting "lines" when file does not exist
* added changelog fragment
* added change in arg_spec to the documentation block
* Update plugins/modules/system/kernel_blacklist.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/kernel_blacklist.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/kernel_blacklist.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* fixed: initialize self.pattern before self.var.is_blacklisted
* File writing recoded
* added try/finally for the file
* multiple changes:
- fixed case when last line of the existing file has no newline char
- added integration tests
* PR: integration test now using remote_tmp_dir
Co-authored-by: Felix Fontein <felix@fontein.de>
If package installation has an error after the package is install (e.g.
when running tags), then there will be output on stderr and the fallback
regex will match; however, since pkg_add exited non-zero, changed is
never added as a key to the dictionary. As a result the code at the end
of main that checks if anything has changed raises a KeyError.
* pythonific!! no camel cases, bitte
* simplified iface attributes parsing
* some improvements, passing tests
* simplified set_interface_option()
* further simplifications
* remove unreachable stmt
* pythonified a file open
* added changelog fragment
* adjustment per PR
* PR: fixed the auto- case
* PR: added testcase and chglog frag for the misleading change report
* extra line removed
* integration is not destructive
* Adding "Id" to the add user function
Some implementations of Redfish (e.g. the one in Cisco's CIMC) seem to require the id of the new user for account creation.
I'm not that firm with Python but lines 982 and 983 should fix it.
* changed indention
* created changelog fragment
* Update changelogs/fragments/3343-redfish_utils-addUser-userId.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update change type
* supplemented the description of the ID parameter
* Update plugins/modules/remote_management/redfish/redfish_command.py
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add opentelemetry callback plugin
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* Formatting (text), booleans and renamed env variables
* This should be done in a future release
* Remove insecure in favour of the OTEL env variable. Add descriptions
* Use OpenTelemetrySource
* Move generate_distributed_traces
* Move update_span_data and set_span_attribute
* Move finish_task
* Move start_task
* Refactor to support UTs
* Add first UT
* Fix codestyle
* opentelemetry callback entry in the botmeta
* Fix linting
* Fix signature
* Mock methods
* Use MagicMock
* Mock the methods
* UT for transform_to_boolean_or_default
* Fix linting
* Set test data
* Mock _time_ns
* Exclude tests for python <= 3.6
* Remove obsoleted setup task type configuration
* Remove unused docs
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* Fix docs
* unrequired logic that was originally took from https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/callback/junit.py\#L226
* Use raise_from for the required dependencies
* Fix linting
* Add requirements for the UTs
* add missing dependency for the opentelemetry plugin in the UTs
* Add ANSIBLE_ prefix for the ansible specific options
* Add more context in the docs and remove duplicated docs
* As suggested in the code review
* Verify if the OTEL env variables for the endpoint were set
* Fix docs typo
* Fix linting
* Revert "Fix linting"
This reverts commit 3a54c827c5472553a6baf5598bc76a0f63f020c1.
* Revert "Verify if the OTEL env variables for the endpoint were set"
This reverts commit cab9d8648899c28c0345745690c4ec7a41f7e680.
* Remove console_output as suggested
* Apply suggestions from code review
Co-authored-by: flowerysong <junk+github@flowerysong.com>
* Delegate the definition of OTEL_EXPORTER_OTLP_INSECURE to the user
* Move definitions above, close to the class that uses them
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: flowerysong <junk+github@flowerysong.com>
* Added token parameter for AccessTokenAuthorizer
Parameters username and password are not required anymore because of
this.
* Added changelog fragments
* Apply suggestions from code review
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
* token authorizer is prioritized
token authorizer is prioritized when token parameter is set
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* domain optional if token not provided
* Updated examples
- `base_url` is required everywhere
- examples for user, name + domain authorization included
- token authorization included
* Update 3327-tss-token-authorization.yml
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Initial commit
* Adding changelog fragment
* Further refactoring
* Fixing bad copy/paste and adding task for psutil >= 5.7.0 install
* Inverting psutil installation order to reduce duplication
* Optimizing regex compilation
* Adds few more gitlab group options
* Update plugins/modules/source_control/gitlab/gitlab_group.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Removes default for new string options
* Removes default from argument_spec
* Adds changelog fragment
* Update plugins/modules/source_control/gitlab/gitlab_group.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/source_control/gitlab/gitlab_group.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/source_control/gitlab/gitlab_group.py
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Maik Schueller <maik.schueller@sap.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Added redis_data_info module
Added:
- redis_data_info module and suggested 'exists' return flag.
- module_utils for redis with a base class that handles database connections.
- inhereited unit tests and added some new ones for the exit flag
* Docfix and sanity
* typo
* Suggested doc changes and ssl option
* TLS and validate_certs fix
* Set support_check_mode for info plugin
* Docfix and import errors
* Redis versioning Fix
* version bump and append fixes
* django_manage - fix fixures
* docs formatting adjustments
* param apps also in need of splitting
* oops, the splitted version was not being properly added to the command args
* added changelog fragment
* check for None
* moving to shlex.split()
* Update changelogs/fragments/3334-django_manage-split-params.yaml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Some vendors surround header etag with quotes, which need to be cleaned before sending a patch
* Minor change fragment
* Add etag strip quote option
* Rebase
* Cleanup fragment
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/remote_management/redfish/redfish_command.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Description update
* Update plugins/modules/remote_management/redfish/redfish_config.py
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Kyle Williams <kyle.williams@thetradedesk.com>
Co-authored-by: Felix Fontein <felix@fontein.de>