* Fix exception in xattr module when existing extended attribute's value contains non-printable characters and the base64-encoded string contains a '=' sign
* Added changelog fragment for #3675
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add test which allows to query whether an action is available.
* Add documentation.
* Fix FreeBSD / macOS compatibility.
* Rename an_action -> a_module.
* Forgot one place.
* Fixed - TypeError: unexpected keyword argument
- File proxmox_group_info.py creates the error "TypeError:
get_group() got an unexpected keyword argument \'group\'\r\n'" if a
group parameter is used.
Issue is an argument naming conflict. After changing the argument
name to 'groupid', as used in method ProxmoxGroupInfoAnsible::get_group,
testing a Proxmox group name is working now.
* Changelog fragment added for #3649
changelog fragment for TypeError: unexpected keyword argument #3649
* Update changelogs/fragments/3649-proxmox_group_info_TypeError.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
While porting this module to make use of `pyone` I have overlooked one
attribute. Luckily the error only occurs when trying to rename an image
to a name that has already been taken.
Instead of telling the user which image ID already uses that name, the
module failed with the following error (along with a huge backtrace):
AttributeError: 'IMAGESub' object has no attribute 'id'
With this commit the error message is much more obvous again.
* add the possibility to restart all supervisorctl programs and groups
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
* Update changelogs/fragments/3551-supervisor-all.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* add info about "all" in the name parameter description
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
* Update plugins/modules/web_infrastructure/supervisorctl.py
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* provide more fitting description for runner timeout
* Update plugins/modules/source_control/gitlab/gitlab_runner.py
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Tim Herren <tim.herren@gmx.ch>
Co-authored-by: Felix Fontein <felix@fontein.de>
* KeycloakClientDiffBugs - Introduce test that passes.
* KeycloakClientDiffBugs - Add test to show that checking of redirect_uri's fails.
* KeycloakClientDiffBugs - (Fix1) Update so that checking of `redirectUris` no longer shows a change.
* KeycloakClientDiffBugs - Add test to show that checking of attributes's fails (sorting issue)
* KeycloakClientDiffBugs - (Fix2) Update so that checking of `attributes` no longer shows a change.
* KeycloakClientDiffBugs - Add test to show that checking of protocol_mappers's fail
* KeycloakClientDiffBugs - (Fix3) Update so that checking of `protocol_mappers` no longer shows a change when there is none.
* Introduce code fragment.
* Update the changelog to be based on the PR instead of the issue.
* Fix the readme
* Fix yaml indentation.
* Fix pep8
* Update changelogs/fragments/3610-fix-keycloak-client-diff-bugs-when-sorting.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update changelogs/fragments/3610-fix-keycloak-client-diff-bugs-when-sorting.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/identity/keycloak/keycloak_client.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Remove need for .copy() after making normalise_cr not mutate the dict.
Co-authored-by: Pierre Dumuid <pierre@knowyourdata.com.au>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Allow for the pacman repository check to be skipped when it's not needed
* Adding a changelog fragment
* Undo the variable rename because the lint doesn't like it
* Update changelogs/fragments/3606-pacman-speed-up-check-if-package-is-installed.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Elie Moreau <emoreau@atlassian.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update gitlab_project_members.py
The actual search method doesn't accept path with namespace for project_name. If you have many project with same name, this module gitlab_project_members can't work.
* Update gitlab_project_members.py
* Update gitlab_project_members.py
* Update gitlab_project_members.py
* Create 3602-fix-gitlab_project_members-improve-search-method
* Rename 3602-fix-gitlab_project_members-improve-search-method to 3602-fix-gitlab_project_members-improve-search-method.yml
* Add initialize_with_readme option to gitlab_project. Update integration/unit tests.
* Fix pep8
* Revert unit tests
* Update plugins/modules/source_control/gitlab/gitlab_project.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/source_control/gitlab/gitlab_project.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/source_control/gitlab/gitlab_project.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Move initialize_with_readme to proper spot to only add if project does not exist.
* Update plugins/modules/source_control/gitlab/gitlab_project.py
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* pipx - fixed bug in state=inject
* added changelog fragment
* copy/paste error in the integration test
* replaced injected package with simpler one
* testing force_lang = None
* disable UTF-8 emojis in pipx output
* better way to achieve the same outcome
* Adjsuted the changelog fragment
* added module mssql_script
* Add changelog fragment
* fixed fragment file (yamllint)
* added me as maintainer
* minor cleanup. (PR comments)
* adjusted for PR comments
- changed key for query results depending on output
- removed "empty" string defaults
* convert unserializable values to string
* python 2 support
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* updates to docs
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* dnf_versionlock: new module
* dnf_versionlock: fix style in doc
* dnf_versionlock: use check_rc in run_command
* dnf_versionlock: fix style and typos in doc
* Consistent Modules - Rename updated_?? to desired_?? in all the keycloak modules.
* Consistent Modules - Rename the comments, and add whitespace so that all the modules are a lot more consistent between each other.
* Consistent Modules - Remove final elif where a final else doesn't exist.
This is to address the inconsistency between the other modules.
Whilst I can see it being more descriptive, there should be a final "else:" to cater if the values is neither 'absent' or 'present'.
* Consistent Modules - Use dict() instead of {} like most of the other keycloak modules.
* Consistent Modules - Update keycloak authentication so that the if ordering is consistent for no-item.
* Consistent Modules - Move the 'Filter and map' process to always occur before getting an existing item.
* Consistent Modules - Be consistent with how to initialse before_?? and set it to dict() if it is None.
* Consistent Modules - Add module.exit_?? in the locations as per the other modules.
* Consistent Modules - Represent result['diff'] using dict(before=.., after=...) as per all the other modules.
* Consistent Modules - Add / Move location of when result['end_state'] is getting defined.
* Consistent modules - Add result['changed'] = False where we do nothing and exit because item exists.
* Consistent Modules - Set the value result['changed'] to True earlier so it shows up when in checking mode only.
* Consistent Modules - test for equality with a dict to assert there was no realm in the first place as per the other modules.
* Consistent Modules - Address the spelling.
* Consistent Modules - keycloak_group - Remove result['group'] as result['end_state'] is the consistent value used in the other modules.
* Consistent Modules - Order the lines in the section, Do nothing and exit consistently.
* Consistent Modules - Add result['end_state'] and still add deprecated `flow` return value.
* Consistent Modules - Add missing return documentation for `msg`.
* Consistent Modules - Tweak whitespace in the RETURN variable.
* Consistent Modules - Add result['group'] in addition to deprecated result['group'] response.
* Consistent Modules - Add return property, 'contains' to address test errors.
* Consistent Modules - Rename updated_?? to desired_?? in new modules since initial PR.
* Consistent Modules - Rename the comments, and add whitespace so that all the (recently added) modules are a lot more consistent between each other.
* Consistent Modules - Make indentation consistent within the response document.
* Consistent Modules - Use B(DEPRECATED) in a seperate line in the description.
* Consistent Modules - Add a lot of full stops to sentences.
* Consistent Modules - Use C(...) and I(...) formatting methods.
* Consistent Modules - Use "on success" everywhere for end_state response documentation.
* Consistent Modules - Update the documents for RETURN.proposed, RETURN.existing, RETURN.end_state to be the same.
* Consistent Modules - Add fragment.
* Remove period after short_description.
* Update changelog fragment.
* Consistent Modules - PRFeedback - Remove `module.exit_json(**result)` within the `Delete` section of the if statement.
There's a exit_json(..) immediately after.
* Consistent Modules - PRFeedback - Use `if not x_repr` instead of `if x_repr == dict()`.
* keycloak_authentication - Add a sample of the output.
* Replace `dict()` with `{}` for all the keycloak modules.
* Add the requested deprecated notices
* Update changelogs/fragments/3280-keycloak-module-cleanup-and-consistency.yml
Co-authored-by: Pierre Dumuid <pierre@knowyourdata.com.au>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Added redis_incr module
Added redis_incr module and unit tests for the module.
Added suggested changes to increment_float, increment_int stuff
* rebased to main, version fix and unit test fix
* Renamed module,added check_mode and fixed retun value
* Update .github/BOTMETA.yml
* check_mode fix and version bump
* fix for lower Redis versions
* Update plugins/modules/database/misc/redis_data_incr.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Fix exception in pkgin module when all packages are already installed.
* Update plugins/modules/packaging/os/pkgin.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add changelog fragment for #3583
Co-authored-by: Felix Fontein <felix@fontein.de>
* pkgng: package reinstallations count as changed
`upgrade_packages()` only looked for the string
"Number of packages to be upgraded", but the
`pkg upgrade` command also reports "Number of packages to be
reinstalled". Reinstallation occurs when package metadata other
than version changes (e.g. build options, single architecture to `*`
architecture). In any other respect, though, a required
reinstallation is the same as an upgrade.
* pkgng: check_mode should count queued actions
Writing tests caught a bug in PR #3393, which enabled
installing more than one package per `pkg` execution.
In converting the module's install/upgrade code to a
queue structure, check_mode got broken because the count
of actions performed was only updated in the `if not check_mode`
block that invokes `pkg`. This two-line change counts
the number of actions in the queue when check mode is
enabled.
* pkgng: add basic integration tests
Test installing a package
Test installing a package into a jail
* pkgng: test with zsh not bash package
Had been using bash package, because it's not
likely to disappear from the package repository
any time soon. Turns out that bash is already
installed on the Ansible community.general
FreeBSD CI VM image, which makes the test fail.
Zsh probably isn't going away any time soon,
either, and likely won't be installed on the
CI image.
* pkgng: remove redundant test for docker container
These tests should be skip/docker, but the test
playbook also redundantly checked whether it was
running in a docker container.
Checking whether `ansible_facts.distribution` is
`FreeBSD` is really sufficient to be sure whether
the test is running in an environment that supports
the `pkgng` module.
* pkgng: add state=absent test
Also renumber `jail=...` test to make diffs less
noisy when adding more non-jailed tests.
* pkgng: add state=latest idemptency test
Add test between state=present and
state=absent that ensures state=latest runs
successfully on an already up-to-date package
with changed=false.
* pkgng: add state=latest test
Including small filesize out-of-date package from
FreeBSD 11 package repository, because FreeBSD 11 is
currently EOL. This test might fail at some point in the
future if the pkg utility in a FreeBSD version > 14
makes breaking changes that prevents it from installing
older package formats.
If that occurs, the fix is to replace
`files/freebsd-release-manifests-20210413__FreeBSD_11.pkg`
with the version of freebsd-release-manifests from the oldest
non-breaking release of FreeBSD, and update the
references to it in tasks/main.yml accordingly.
* pkgng: use hand-generated test package
Instead of relying on a broken-ish installation
of an older package from FreeBSD 11, hand-generate
a package named `zsh` with no contents and a version
number of `0`. It can be installed on any architecture
and any revision of FreeBSD sucessfully, and it will
always be eligible for upgrade.
* pkgng: CI seems to dislike plus-signs in filenames
* pkgng: refactor renaming test package manifests
refactored to make intent of adding '+' sign clearer
* pkgng: refactor upgraded pattern matching
Implement russoz's suggestion to put all
variants in the pattern.
* pkgng: add cached=yes test
Changed idempotency test, because this covers both.
* pkgng: test pkg works on any FreeBSD version
Removing `ansible_distribution_version`, because the
test out-of-date zsh package should install on any
FreeBSD version.
* pkgng: move FreeBSD tasks to imported file
Refactoring tests for more reuse and easier
readability.
* pkgng: refactor tests for task reuse
Several tests need to install an out-of-date package
to test whether upgrades occur successfully, so this
commit refactors out the generation of the test package.
Also, factor out things like the name and path of the
test package so that is more maintainable should the
target test package (currently `zsh`) ever need to
change.
* pkgng: test install multiple packages
Multiple packages should install with a single
invocation of the `pkg` utility.
* pkgng: handle space- and comma-separated lists
The module expects a list of strings in the `name` parameter,
but long-standing documentation showed space- and comma-delimited
lists as a valid way of telling the module to act on multiple
packages. Passing these lists through to the `pkg` command can
have unexpected side-effects of upgrading packages when
`state=present` rather than `state=latest` and could result
in the module reporting the wrong number of packages for each
action performed.
* pkgng: test state=latest for mixed install/upgrade
Test that a list of packages given, one not installed
and one installed but out-of-date are handled correctly.
* pkgng: use YAML lists for multiple packages
I had been following the documentation examples, and
specifiying multiple packages on one line. The right way
to do it is with YAML list syntax.
* pkgng: add test for autoremove=yes
Install package with known dependencies, then
remove it and ask autoremove to run.
* pkgng: test autoremove=yes only on FreeBSD > 12
The CI test runner on FreeBSD 12.0 times out when
downloading large packages.
* pkgng: test jail creation logging less verbose
`ezjail-admin` had been spewing every filename copied
into the jail onto stderr, making the `ansible-test -v`
logs hard to scroll through. Changed it so that ezjail
output only shows up in the ansible task logs if
`ansible_verbosity > 1` (`-vv...`). Full `ezjail-admin`
output is always logged to `/tmp/ezjail.log`.
* pkgng: pass tests when package dependencies change
Tests that install packages with dependencies were failing
when those dependencies were not already installed, because
the count of installed packages was greater than the count
of requested to be installed packages. This change checks
for a count of installed packages that is greater than or
equal to the count of requested to be installed packages.
Example:
- Test installs packages `zsh` and `fish`
- `fish` has a dependency on `pcre2`
- `pkg` reports `Number of packages to be installed: 3`
* pkgng: test annotation for single package
Add/modify/remove annotation for a single package
* pkgng: fix annotation operations
Annotation has been broken at least since the migration to
collections. There are some breaking typos and function argument
omissions in the code with nothing in `git blame` but "Initial commit".
New integration tests uncovered this breakage. Works now.
* pkgng: test multiple annotations
Test multiple annotations specified both in new (YAML list)
syntax and old (comma-delimited) syntax.
Rename some annotation test tags from the single-annotation
tests to make sure that single and multiple annotation tests
don't collide.
* pkgng: test invalid annotate strings
Ensure that some likely to occur, invalid strings
given to the annotate module parameter 1. fail,
2. do not cause an exception, and 3. do not create
any actual annotations on packages.
* pkgng: fix check_mode for annotate
Actions specified in the `annotate` parameter would
always be performed, even if `check_mode=yes`.
This commit fixes `check_mode` for the annotation
functions and adds integration tests to ensure that
check mode is honored in the future.
* pkgng: call module.run_command with list
Instead of calling `run_command` with a formatted
string, call it with a list to maintain safer argument
separation.
Also, introduce a wrapper for `run_command`, `run_pkgng`,
which manages the process environment and some common
command line switches, based upon the module parameters.
Introduced in this commit, also pass annotation values
to `pkg annotate` via stdin, which is safer with long
values than putting them in argv.
* pkgng: update documentation to match annotate type
Missed updating the documentation to match the change
of the annotate parameter from comma-separated string
to list of strings.
* pkgng: fix syntax for Python 2
Seems *args, **kwargs have to be the last
two arguments in Python 2 syntax. CI sanity
tests were failing.
* pkgng: oops, pkgsite should be from closure
I put `pkgsite` as a keyword argument to `run_pkgng()',
which wasn't correct at all and resulted it in capturing
the second positional argument given by any caller.
`pkgsite` should have been `p["pkgsite"]`, coming from the
closure environment of `main()`.
* pkgng: Fix changelog fragment quote formatting
Co-authored-by: Felix Fontein <felix@fontein.de>
* pkgng: add test prepare task
Make sure test environment does not contain the
test package.
* pkgng: make integration test package more flexible
Make integration test package building template-based,
so more flexible if in the future the name of the test package,
currently `zsh`, must change.
* pkgng: convert generator to list for 2.9
Ansible 2.9 can't count items from a generator,
so convert `select` filter output via `list`
before passing to `count`.
* pkgng: Ansible 2.9 has no "false" Jinja2 test
Apparently Ansible 2.9 doesn't have the "false" test
in Jinja2 contexts. Switching to use `rejectattr(...)`
instead of `selectattr(..., "false")`.
* pkgng: test pkgsite parameter
* pkgng: add tests for chroot and rootdir params
Refactor install tasks into an include file so they
can be reused and tested with various parameters.
* pkgng: clean up test package creation
Make pkg json manifest more readable. Create package using
FreeBSD's `pkg create` instead of manually using tar. This
change also simplifies the manifest to a single file for
the integration test role.
* pkgng: fix#3428; install from local file
Fixes a bug in which the module reported failure
when installing from a local (to the target host)
file path.
Fixes#3428
* pkgng: changelog fragment formatting issue
* pkgng: check for all test package extensions
pkg recently changed file extensions, so for the
tests to work on multiple recent versions of FreeBSD,
we must check for `pkg create` output with varying
filename.
* Revert "pkgng: fix#3428; install from local file"
As the module has invoked pkg with the `-g` flag for
at least 7 years, I'm not sure when it was possible
to install packages from files on the target host
filesystem, because pkg rejects file paths when
the `--glob` flag is enabled.
I considered doing a rework of the pkg invocation
to enable good support for installing from local
files, but it looks like more of a job than for this PR.
This reverts commit 5f94eac41f.
* pkgng: Add minor_changes fragment for #3526
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Redfish: Do not set the boot source override mode if not provided by the user
Signed-off-by: Mike Raineri <michael.raineri@dell.com>
* Corrected changelog file extension
Signed-off-by: Mike Raineri <michael.raineri@dell.com>
* Update changelogs/fragments/3509-redfish_utils-SetOneTimeBoot-mode-fix.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* nmcli: Fix ipv6.dns not being recongnized as list
There was a missing comma on the previous line.
* nmcli: Add changelog fragment for #3563
* nmcli: Update changelogs/fragments/3563-nmcli-ipv6_dns.yaml
Make the fix description more descriptive
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
* nmcli: Remove ipv4.route-metric from list-typed properties
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
* nmcli: Update fragment 3563 with ipv4.route-metric bug
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
* Redfish: perform manager network interface configuration even if property is missing
Signed-off-by: Mike Raineri <michael.raineri@dell.com>
* Update changelogs/fragments/3404-redfish_utils-skip-manager-network-check.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* [callback][elastic] enrich span with http attributes
* [callback][opentelemetry] fix linting
* [callback][opentelemetry] fix UTs
* [opentelemetry][changelog] add fragment for the service map feature
* Update plugins/callback/opentelemetry.py
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
* [opentelemetry][callback] remove comments
* [opentelemetry][callback] fix UTs
* [opentelemetry][callback] return the value
otherwise a None value returns ParseResultBytes when using urlparse(None)
* [opentelemetry][callback] fix wrong parameter order
* [opentelemetry][callback] support for no interpolated URLs
* [opentelemetry][callback] support for URLs without interpolation in the hostname
* [opentelemetry][callback] fix linting
* Update changelogs/fragments/3558-callback_opentelemetry-enrich_service_map.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
* ipa: add append parameter to modify_if_diff
* ipa_group: add state: append
* ipa_group: rework append to an option instead of another state
* ipa_group: append default=no
* ipa_group: add change fragment for new append option
* ipa_group: restore descriptions for group and user
* ipa_group: re-add missed quotation mark
* ipa_group: set default for append in
argument_spec
* ipa_group: add .yml ext to fragement file
* ipa_group: corrections to append description
* ipa_group: refine change fragement text
Co-authored-by: Felix Fontein <felix@fontein.de>
* ipa_group: use correct macros in option descriptions
Co-authored-by: Felix Fontein <felix@fontein.de>
* ipa_group: include append in user and group descriptions
* ipa_group: add version_added
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add names to tasks in oneview module examples
* Fix task name in github_webhook module example
* Fix trailing whitespace
* Add changelog fragment
* Remove changelog fragment
* Integration Tests for Options added, includes 'proxycommand'
* New option 'forwardagent' added to integration tests
* Missing double quotes added to 'forwardagent' values to enforce handling as string
* New option 'forwardagent' added
* yamllint error resolved
* 'forwardagent' type changed from str to choices (yes/no)
* Changelog added
* correct typo
Co-authored-by: Felix Fontein <felix@fontein.de>
* version info added to new option
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix(ssh_config): option name to snake_case, type str to bool
* fix(ssh_config): convert bool true/false to str yes/no
* fix(ssh_config): rename option to 'forward_agent' in integration test
* fix(ssh_config): args key 'forwardagent' renamed to 'forward_agent'
* fix(ssh_config): 'else' replaced with 'if' statement to cover case when value is 'None'
* increase version_added to 4.0.0
Co-authored-by: Felix Fontein <felix@fontein.de>
* simplify if statement for True/False to yes/no mapping
Co-authored-by: Felix Fontein <felix@fontein.de>
* update comment to better describe functionality
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix(ssh_config): avoid overwrite of existing option in case of None value
* test(ssh_config): case added to verify no changes on existing option if not given in playbook
Co-authored-by: Felix Fontein <felix@fontein.de>
* macports: add stdout and stderr to status (#3499)
* Add changelog fragment
* Update changelogs/fragments/3500-macports-add-stdout-and-stderr-to-status.yaml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Aoife Finch <aoife@finch.ink>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add elastic callback plugin
* Capture task failures
* Catch errors and add UTs
* Skip 3.5< python versions and install dependency
* fix lint
* Fix linting
* Fix linting
* Add botmeta
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* It's not required
* As suggested in the code review OrderedDict has been added to the Python stdlib since version 2.7
* Update plugins/callback/elastic.py
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* 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>
* - fix to issue 3041
- add func to work with user lists
- add func to set members to the ones give
* Added version_added to new parameter
* fixed elements in definition of gitlab_users nad wrong import in gitlab_users
* linter issues fixed
* added list elelements to argument_spec
* More whitspeaces for the linter
* Update plugins/modules/source_control/gitlab/gitlab_group_members.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* adapted changelog
* removed bugfix (other PR), changes due to review
* changed input handling according to review
* Fixed test findings
* Added list of dict to allow for specifying user/access_level tuples
* corrected doc section
* fixed parameter definitions
* removed strange additional import
* Update changelogs/fragments/3041-gitlab_x_members_fix_and_enhancement.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>
* Update plugins/modules/source_control/gitlab/gitlab_project_members.py
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>
* Update plugins/modules/source_control/gitlab/gitlab_group_members.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* fixed required if
* Update plugins/modules/source_control/gitlab/gitlab_group_members.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Added suggestions from PR
* fixed identation problem
* Update plugins/modules/source_control/gitlab/gitlab_group_members.py
Co-authored-by: Zainab Alsaffar <za5775@rit.edu>
* Update plugins/modules/source_control/gitlab/gitlab_group_members.py
Co-authored-by: Zainab Alsaffar <za5775@rit.edu>
* Update plugins/modules/source_control/gitlab/gitlab_group_members.py
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>
* Recommended changes from discussionst
* Fixed issues from automatic tests
* added missing metaclass due to test finding
* added integration tests
* Update plugins/modules/source_control/gitlab/gitlab_group_members.py
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>
* Update plugins/modules/source_control/gitlab/gitlab_group_members.py
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>
* Update plugins/modules/source_control/gitlab/gitlab_group_members.py
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>
* Update plugins/modules/source_control/gitlab/gitlab_group_members.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* fixed optimization for only one user
* Reverted gitlab_project_members to original version - changes will be done in a separate branch
* added examples for new functionality
* - fixed changelog after reverting gitlab_project_memebers
- fully reverted gitlab_project_members
* Fixed error handling: when single users are not updateable in bulk mode the exception should not stop the code flow but document the problem in the result.
* Better error handling
* on error give username, not gitlab numeric userid
* Fixed broken check_mode
* Update plugins/modules/source_control/gitlab/gitlab_group_members.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Change from review
Co-authored-by: Max Bidlingmaier <Max-Florian.Bidlingmaier@sap.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Zainab Alsaffar <za5775@rit.edu>
* zfs.py: treated received properties as local and added diff mode support
If you use "zfs set" to explicitly set ZFS properties, they are marked as from source "local". If ZFS properties are implicitly set by using "zfs send" and "zfs receive", for example as part of a template based installation, they are marked as from source "received". But as there is no technical difference between both types of them, the “received” ZFS properties should also be considered “local”. Otherwise Ansible would detect changes, which aren’t actual changes. Therefore I changed line 202/207 to reflect this.
For us it’s quite important, that Ansible modules support the diff mode in order to qualify changes. Therefore I added some code lines to address this.
* added changelog fragment for PR #502
* fixed typos in changelog fragment for PR #502
* minor changes in changelog fragment for PR #502
* added link to pull request in changelog fragment for PR #502
* extended the diff data structure to always include the name of the zfs filesystem
* added code to also maintain the diff data structure after a change
* reverted back some code lines for better code readability
* added an extra dict in the diff data structure to hold the zfs properties
* udm_dns_record: Fix handling of PTR records (#3244)
Before, it was not possible to manage PTR records in Univention DNS,
due to broken zone lookups and improper used parameters of the object.
This patch fixes the PTR handling, allowing both v4 and v6 entries.
* udm_dns_record: [doc] add changelog fragment
* udm_dns_record: [fix] validation errors
* udm_dns_record: import ipaddress module conditionally (#3244)
* udm_dns_record: fix sanity check error, improve doc (#3244)
* udm_dns_record: Improve changes to meet community standards (#3244)
* snap - improved error handling
* added changelog fragment
* removed experiments left overs
* rolled back the smaller list of params for commands other than install
* Fixed incorrect VMID: cloning to an existing VM
During a cloning operation, if the destination VM already exists the VMID returned is not correct.
The VMID returned should be that of the destination VM and not that of the source VM (consistent with line 1230).
A playbook that relies on the returned VMID, for example, to perform other operations on the destination VM, will not work properly if it is unexpectedly interrupted.
* Add files via upload
* moved 3266-vmid-existing-target-clone.yml to changelogs/fragments/
replaced line separator CRLF -> LF
* storing vmid list in variable to avoid multiple API calls
* Linode Inventory can use full IP data from APIv4
- The Linode dynamic inventory module does not currently distinguish
between private and public IP addresses even though the Linode APIv4
contains this information. This change keeps the current behavior as
the default and adds an option to set `ip_style: api`. When set, this
option allows administrators to differentiate between private, public,
slaac, local_link, and pool network addresses providing a more nuanced
and granular view of the remote host's network information.
Signed-off-by: Kellin <kellin@retromud.org>
* Review - amend changelog details
- Adds a link back to this pull request
- Uses markdown styles for easier to read publishing in the changelogs
- Amends the wording style to match the existing changelog styles
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add scope to example invocation
- Adds the `community.general` scope to invocation example
Co-authored-by: Felix Fontein <felix@fontein.de>
* Convert lamda to list comprehension
- Change the ip type filter from a lambda to a list comprehension
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add punctuation to description sentence
- Adds a period to the end of the description sentence
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
If `api_token` is not set and config file exists, it will try to fetch
the value from the activated profile and fallback on default.
This should not break existing workflows.
* Add option for retry_servfail
cf. https://dnspython.readthedocs.io/en/latest/resolver-class.html#dns.resolver.Resolver.retry_servfail
Setting this option to `True` allows for the possibility of the lookup plugin to retry and thereby recover from potentially transient lookup failures, which would otherwise cause the task or play to bail with an unrecoverable exception.
* Create 3247-retry_servfail-for-dig
* documentation for `retry_servfail` option
* Rename 3247-retry_servfail-for-dig to 3247-retry_servfail-for-dig.yaml
* fix whitespace
* Update plugins/lookup/dig.py
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
* Update plugins/lookup/dig.py
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
* rm try/except block
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
* nmcli: Disallow Wi-Fi options not supported by nmcli
By querying nmcli directly
* Added changelog fragment
* Added tests
* Simplify `get_available_options()`
* Update changelogs/fragments/3141-disallow-options-unsupported-by-nmcli.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Remove redundant `802-11-wireless` settings from test show outputs
* Update `mocked_wireless_create(mocker)`
* Update plugins/modules/net_tools/nmcli.py
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
* Address comment re. creating function & use nmcli naming conventions
I.E. `setting`.`property` = `value`
```
nmcli> help set
set [<setting>.<prop> <value>] :: set property value
This command sets property value.
Example: nmcli> set con.id My connection
```
* Added `ignore_unsupported_suboptions` option & improved `wifi(_sec)` doc
* Corrected pep8 issues
```
ERROR: Found 2 pep8 issue(s) which need to be resolved:
ERROR: plugins/modules/net_tools/nmcli.py:342:161: E501: line too long
(236 > 160 characters)
ERROR: plugins/modules/net_tools/nmcli.py:359:161: E501: line too long
(237 > 160 characters)
```
* Fixed remaining sanity check issues and added even more docs
* No need to split Note
* Update plugins/modules/net_tools/nmcli.py
3.5.0 has already been released.
Co-authored-by: Felix Fontein <felix@fontein.de>
* Followed uniformity guideline for format macros from Ansible's dev guide
* Addressed comment
https://github.com/ansible-collections/community.general/pull/3141#discussion_r689098383
* Documentation cleanup continuation
* Replace `NM_SETTING_*`s having a description with their numeric value
* Splitting up long paragraphs.
Also removed `wifi`.`seen-bssids` as it "`is only meant for reading`"
* Addressed remaining comments and clarified `wake-on-lan` note
* 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>
* 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>
* Finishing addressing documentation comments.
* Update plugins/modules/net_tools/nmcli.py
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
* Update plugins/modules/net_tools/nmcli.py
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
* Update nmcli.py
* Added wifi-related `list` type options to `settings_type` method
* Moved `edit_commands` `execution` logic into its own method
* Move `unsupported_property` deletion into `main` function
* Missing `.items()`
* Resolved missing proper `nmcli conn edit` arguments
* Resolve pylint issue `dangerous-default-value`
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
Co-authored-by: David Hummel <dhummel@Fingerling>
* redfish_info: Include Status property for GetChassisThermals
Include Status property for Thermal objects when querying Thermal properties
via GetChassisThermals command.
FIXES#3232
* fixup for rename of fragments file
* Update changelogs/fragments/3233-include-thermal-sensor-status-via-redfish_info.yaml
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
* Added fix for bug report in issue #3192
* Added changelog fragment
* Typo fix
* Added Importerror to exception - as req by linters
* Moved the conditional import statement to try/except block
* module_helper - implemented classmethod to start the module plus minor change
* rolled back the __changed__() method
* added changelog fragment
* Update plugins/module_utils/mh/base.py
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
* no capt Piccards allowed in the base class
* removed extra piccards
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
- Fix a typo in the Linode inventory plugin unit tests
- Fix some style issues in descriptions where punctuation was missing
Signed-off-by: Kellin <kellin@retromud.org>
* slack - minor refactoring and pythonifying
* added changelog fragment
* Update changelogs/fragments/3205-slack-minor-refactor.yaml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* refactor to vdo
* adjusted if condition
* added changelog fragment
* Update plugins/modules/system/vdo.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* adjustements per the PR
* more occurrences of bool compared with yes or no
* Update changelogs/fragments/3191-vdo-refactor.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add ipv4 example to linode inventory
* Update plugins/inventory/linode.py
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* ini_file - prepare for fixing #273
- restructure tests
- fix error message call: fail_json() takes 1 positional argument but 2 were given
* ini_file - multiple values for one option (#273)
- add module option 'exclusive' (boolean) for the abbility to add
single option=value entries without overwriting existing options
with the same name but different values
- add abbility to define multiple options with the same name but
different values
* ini_file - add more tests for ini_file
* ini_file - fix sanity tests
* apply suggested changes:
- rename 03-regressions.yml to 03-encoding.yml
- fix typos
- fix documentation
* apply suggested changes:
- test errors also for result is failed
* apply suggested changes:
- make state=absent also work with module option exclusive
- add more tests for state=absent and module option exclusive
* fix sanity test:
- 02-values.yml:251:9: hyphens: too many spaces after hyphen
* apply proposed changes
* apply proposed changes from review
- adjust version_added to 3.6.0
- small syntax change in changelog fragment
* Initial Commit
* Comparing with tar file checksums rather than tar header checksums
* Added changelog fragment
* Revert "Comparing with tar file checksums rather than tar header checksums"
This reverts commit bed4b17107.
* Restricting idempotency tests by format
* Applying review suggestions
* zypper: support transactional-updates
- Check if transactional updates are in use by checking for the
existence of /var/lib/misc/transactional-update.state
- Prefix zypper-commands with /sbin/transactional-update --continue --drop-if-no-change --quiet run
if this is the case
fixesansible-collections/community.general#3159
* re-add get_bin_path for executables
* fix typo
* Support older version of psutil (RHEL7 and RHEL6)
The psutil python module is a true mess, they changed the API twice. The function arguments, as well as the objects that are returned.
The documentation does not make it clear which version supports what so the safest implementation is this waterfall approach.
A better approach would be to inspect the returned information, rather than trust a version, but that would not be any more efficient.
In the end it is better to have something that at least works out-of-the-box on all platforms than something that requires custom updates to system packages before it works as expected. Especially for something as basic as `pids`.
* A little bit more concise
* Apply suggestions from code review
* Add changelog fragment.
Co-authored-by: Felix Fontein <felix@fontein.de>
When a package name contains special characters (e.g. "g++"), they are
interpreted as part of the regexp.
This can lead to a crash with an error in the python re module, for
instance with "g++":
sre_constants.error: multiple repeat
Fix this by escaping the package name.
Co-authored-by: Baptiste Jonglez <git@bitsofnetworks.org>
* nmcli: use `stdin` for setting private `wifi_sec` options
I.E.:
* `802-11-wireless-security.leap-password`
* `802-11-wireless-security.psk`
* `802-11-wireless-security.wep-key0`
* `802-11-wireless-security.wep-key1`
* `802-11-wireless-security.wep-key2`
* `802-11-wireless-security.wep-key3`
* Changelog fragement formatting.
* Update changelogs/fragments/3160-pass-wifi-secrets-via-stdin-to-nmcli-module.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Make `wifi_sec_secret_options()` into a constant
* Minor cleanup
`'set ' + key + ' ' + value`
=>
`'set %s %s' % (key, value)`
* Change `casing`
* Change `WIFI_SEC_SECRET_OPTIONS` from `list` to `tuple`
* Update `edit_connection()` to not reset `edit_commands`
It will just re`set` them if `edit_connection()` is called more than
once.
* Do not call `edit_connection()` if `connection_update(*)` fails
* Fixed `pep8` issue `E713` in tests
`test for membership should be 'not in'`
* Simplify `create_connection()`/`modify_connection()` logic
* `WIFI_SEC_SECRET_OPTIONS`=>`SECRET_OPTIONS`, options are prefixed
* Moved `if key in self.SECRET_OPTIONS` into `if value is not None` check
We don't need to do anything is the value is None
Co-authored-by: Felix Fontein <felix@fontein.de>
* Fixed `wifi_sec` option changes are not detected
Also updated `docs` URL and formatting to match that of the `wifi`
option
* Removed extraneous `appends` to `cmd` in `connection_update`
These really should have only been added to `connection_options` whose
return values get `extended` onto `cmd`
* pkgin: display stdout and stderr in case the error occurs
* Update changelogs/fragments/pkgin-output-after-error.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Updated the plugin to reflect breaking changes introduced in the underlying SDK v1.0.0 update.
* Added Changelog fragment
* Updates based on feedback/review
* Added newline to pass CI
* Added whitepace for linter
* Update changelogs/fragments/3139-tss-lookup-plugin-update-to-make-compatible-with-sdk-v1.yml
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
* For #3134
Expose BootOverrideMode parameter to redfish_command to allow setting by user during run.
* Fix trailing whitespace
* Add changelog fragment to contribution.
* Update changelogs/fragments/3135-add-redfish_command-bootoverridemode.yaml
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>
* Update plugins/modules/remote_management/redfish/redfish_command.py
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>
* Update plugins/modules/remote_management/redfish/redfish_command.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update changelogs/fragments/3135-add-redfish_command-bootoverridemode.yaml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* added utf-8 markers to all .py files in plugins/filter
* added utf-8 markers to all .py files in plugins/inventory
* added utf-8 markers to all .py files in plugins/lookup
* added utf-8 markers to all .py files in plugins/{action,cache,callback}
* added utf-8 markers to all .py files in plugins/connection
* added utf-8 markers to all .py files in plugins/doc_fragments
* report power state of host
* Modify sample information
* add changelog fragment
* apply feedback from github community
* apply feedback
Co-authored-by: Yvan E. Watchman <git@yvanwatchman.eu>
* multiple improvements
* added changelog fragment
* comment and name in int test files
* added notes to the documentation
* removed the extraneous changelog frag
* Update plugins/modules/web_infrastructure/apache2_module.py
* adjusted doc text for sanity check
* Update plugins/modules/web_infrastructure/apache2_module.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* removed extraneous dependency in integration test
Co-authored-by: Felix Fontein <felix@fontein.de>
* initial commit
* multiple changes:
- added a proper process_command_output()
- adjusted the output_params fields (and removed other *_params fields)
* added RETURN documentation, plus few adjustments
* fixed sanity tests
* updated BOTMETA.yml
* further adjustments
* integration tests - first commit
* removed unused files from integration test
* added role installation tests
* removed extraneous cmd line option
* added requirement-file installation tests
* adjusted documentation and output variable names
* fixed integration test
* Update plugins/modules/packaging/language/ansible_galaxy_install.py
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
* Update plugins/modules/packaging/language/ansible_galaxy_install.py
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
* Update plugins/modules/packaging/language/ansible_galaxy_install.py
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
* Update plugins/modules/packaging/language/ansible_galaxy_install.py
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
* Update plugins/modules/packaging/language/ansible_galaxy_install.py
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
* Update plugins/modules/packaging/language/ansible_galaxy_install.py
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
* Update plugins/modules/packaging/language/ansible_galaxy_install.py
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
* Update plugins/modules/packaging/language/ansible_galaxy_install.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update tests/integration/targets/ansible_galaxy_install/aliases
Co-authored-by: Felix Fontein <felix@fontein.de>
* Per comments in the PR:
- fixed missing paths case
- fixed install parsing (regexp) for ansible-galaxy collection install in v2.10
* changed the collection installed in test to something unlikely to come embedded in Ansible itself
* fixed logic for Ansible 2.9
* kill trailing whitespace
* changed default language from C.UTF-8 to en_US.UTF-8
* updated c.g version
* skipping test in python 2.6, as ansible-galaxy no longer supports it in devel
* Multiple changes:
- improved docs on ansible 2.9 and python 2.6
- removed method __changed__() - unnecessary since tracking changes in the ansible29_change var
- renamed methods __run29__() and __run210plus__() to __setup29__() and __setup210plus__(), respectively
- ansible 2.9 warning for requirements_file only when type is "both"
* sanity fix
* further adjustments
* removed extraneous doc
* changed method to determine remote ansible version
* do not allow type=both in Ansible 2.9
* Update plugins/modules/packaging/language/ansible_galaxy_install.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/packaging/language/ansible_galaxy_install.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* changed method names per PR
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
* minor refactoring in gunicorn module
* added changelog fragment
* reworked the gunicorn bin path part of the code, per PR
* Update changelogs/fragments/3092-gunicorn-refactor.yaml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* import certificate+key bundle from pkcs12
* fix typo/syntax
* fix variable name
* fix passwords order and improve error handling
* add changelog fragment
* enter keystore pass only once if keystore already exists, and twice at creation
* nomalize tests
- Replace `command` tasks by dedicated (community.crypto) modules.
- Add spaces around jinja2 variable names.
- Call modules by their FQCNs.
* Add tests to check keystore has a private key
fix tests for RedHat/CentOS < 8 (run openssl command as an alternative to
`openssl_pkcs12` module)
* Clone sucess should return new vm id, not id from cloned vm.
* add changelog fragment
* Update changelogs/fragments/3034-promox-kvm-return-new-id.yaml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Yvan E. Watchman <git@yvanwatchman.eu>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Deprecate get state in favour of the xfconf_info module
* added changelog fragment
* added comments in ignore files
* Update changelogs/fragments/3049-xfconf-deprecate-get.yaml
bummer, forgot that
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/xfconf.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/system/xfconf.py
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Initial commit
* Fixing units and path joins
* Ensuring paths are consistently ordered
* Adding changelog fragment
* Using os.path.join to ensure trailing slashes are present
* optimizing use of root in add_targets
* Applying initial review suggestions
* Don't know why this works but it does.
Plugin was crashing on this line on Python 3.9.2 deployed on qemu image with debian bullseye. It doesn't crash anymore.
* Create 3052_proxmox_inventory_plugin.yml
* Update changelogs/fragments/3052_proxmox_inventory_plugin.yml
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
* Added module for creating protected branches
* Applied some changes due to comments and added a test that currently fails
* Changing no_access to nobody due to comment on PR
* Changing the description to clarify it a bit more
* Added working tests for module 'gitlab_protected_branch'
* Fixing lint issues
* Added doc that minimum of v2.3.0 is needed to work correctly
* Fixed the requirements notation
* Check the version of the module
* Hopefully fixed the tests by skipping it when lower version of 2.3.0 is installed
* Fix lint issues
* Applying changes due to comments in PR
* Remove commented code
* Removing the trailing dot ...
Co-authored-by: jenkins-x-bot <jenkins-x@googlegroups.com>
Co-authored-by: Werner Dijkerman <iam@werner-dijkerman.nl>
* added feature flag to control whether CmdMixin adds rc, out and err to the result of the module
* added changelog fragment
* changed from a global flag to parameters in run_command
* updated changelog
* fixed brainless copy-paste of yours truly
* extend support for FreeBSD
* Check if FS exists with `fstyp` if `blkid` fails to find FS signature
(fix a potential data loss)
* Add support for FreeBSD special devices (character devices).
* Add support for FreeBSD native fstype (UFS).
* Update DOCUMENTATION accordingly.
* add/update integration tests
* Add tests for `fstype=ufs` on FreeBSD.
* Run `remove_fs` tests (`state=absent`) on FreeBSD.
* Run `overwrite_another_fs` tests on FreeBSD.
* add a changelog fragment
* fix indentation
* restrict new tests to regular files
* fix typo
* fix searching of providersize (block count)
* add '-y' option to growfs command
* remove references to versions older than the collection itself
* bump version adding new feats to 3.4.0
* reformat *collection* and *version added* for better DOCUMENTATION parsing
* skip tests for FreeBSD < 12.2
* run tests for FreeBSD >= 12.2
* re-enable tests for FreeBSD < 12.2 and give it a try with group1
* util-linux not available on FreeBSD < 12.2
* Add authentication_flow_binding_overrides option to the keycloak_client module
* Add changelog fragment
* Update changelogs/fragments/2949-add_authentication-flow-binding_keycloak-client.yml
Co-authored-by: Amin Vakil <info@aminvakil.com>
* Update plugins/modules/identity/keycloak/keycloak_client.py
Co-authored-by: Amin Vakil <info@aminvakil.com>
* Update plugins/modules/identity/keycloak/keycloak_client.py
Co-authored-by: Amin Vakil <info@aminvakil.com>
* Add unit test authentication_flow_binding_overrides feature on keycloak_client module
Co-authored-by: Amin Vakil <info@aminvakil.com>
* Remove necessities on password or token.
* Upper case letter -> Lower case letter
Co-authored-by: Amin Vakil <info@aminvakil.com>
* Documentation update.
* C -> I
Co-authored-by: Amin Vakil <info@aminvakil.com>
* fixed param order
* added changelog fragment
* rebased and uncommented tests per PR
* added /snap link in RH
* typo in tests
* Update tests/integration/targets/snap/tasks/default.yml
Co-authored-by: Felix Fontein <felix@fontein.de>