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.
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.
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.
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.
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`
`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`.
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.
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.
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.
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.
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.
* 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.
* 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>
* 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>
* 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>
* Restrict to unit tests with devel (to be reverted later).
* Restrict lxml for Python 2.6.
* Revert "Restrict to unit tests with devel (to be reverted later)."
This reverts commit d0d87a8a0f.
* 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>