* python_requirements_info - improvements
- returns python version broken down into its components
- minor refactoring
* adjusted indentation in the documentaiton blocks
* added changelog fragment
* fixes from PR review + assertion in test
* initial commit for deprecate_attrs
* completed tests
* added spaces
* test now works when tehre is more than one deprecation
* trying == instead of eq in jinja
* new approach to testing
* removed extraneous debug message
* Replace RHEL 8.4 by RHEL 8.5 for devel.
* Install virtualenv.
* Revert "Install virtualenv."
This reverts commit 22ba0d074e.
* Just do another skip...
* 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.
* 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>
* 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
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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
* 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>