Commit Graph

54158 Commits (56e39b3e7289d09803b09b392678f06b42e7e3bb)
 

Author SHA1 Message Date
Sloane Hertel 59c5f776b6
Add the task info for tombstoned module/action plugins (#82451) (#83040)
* Add the task info for tombstoned plugins

* Fix deprecation for 'include' by removing it from BUILTIN_TASKS which skip the plugin loader lookup

* changelog

remove obsolete unit test using 'include'

* Update changelogs/fragments/improve-tombstone-error.yml

(cherry picked from commit caa86cc4df)
7 months ago
Martin Krizek 28092180b0
[stable-2.16] dnf fixes (#83084)
* dnf: fix installing a package based the file it provides (#82744)

Fixes #82461

(cherry picked from commit a28709f92d)

* dnf: utilize the API for the installed checks (#82725)

Fixes #71808
Fixes #76463
Fixes #81018

(cherry picked from commit f1ded0f417)

* setup_rpm_repo/create_repo: "Arch dependent binaries in noarch package" (#83108)

This fixes "Arch dependent binaries in noarch package" error cause by
including files created by make_elf function in noarch packages. While the
error only manifests itself on EL 7 and 8 it is better to use files
suitable for noarch packages to prevent the error potentially
re-occuring in the future.

(cherry picked from commit 87bead3dcf)
7 months ago
Abhijeet Kasurde 1f4eb2160b
[stable-2.16] assemble: fixed missing parameter error (#83124)
* content is an optional parameter for _get_diff_data API

Fixes: #82359

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 months ago
Sloane Hertel 72013559fe
Fix installing roles containing symlinks (#82911) (#83137)
* Fix installing roles containing symlinks

Fix sanitizing tarfile symlinks relative to the link directory instead of the archive

For example:

role
├── handlers
│   └── utils.yml -> ../tasks/utils/suite.yml

The link ../tasks/utils/suite.yml will resolve to a path outside of the link's directory, but within the role

role/handlers/../tasks/utils/suite.yml

the resolved path relative to the role is tasks/utils/suite.yml, but if the symlink is set to that value, tarfile would extract it from role/handlers/tasks/utils/suite.yml

* Replace overly forgiving test case with tests for a symlink in a subdirectory of the archive and a symlink in the archive dir when these are not equivalent.

* Build test case from role files to make it easier to add test cases

Fixes #82702
Fixes #81965
Fixes #82051

(cherry picked from commit e84240db84)
7 months ago
Abhijeet Kasurde b92e2eb20b
[stable-2.16] uri: update docs for follow_redirects (#83177)
* [stable-2.16] uri: update docs for follow_redirects

* Updated the docs for the parameter follow_redirects

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit fcc6d0bd0c)

* CI fixes

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

---------

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 months ago
Matt Martz 3761e11a5c
[stable-2.16] Don't hardcode the dnf module, dynamically select one (#83183). (#83185)
(cherry picked from commit dc6b77beca)
7 months ago
Matt Clay 691ee745e0
[stable-2.16] Update sdist path in release tool (#83059)
The latest setuptools package uses a normalized package name for the sdist.

(cherry picked from commit 8bc0d809a6)
8 months ago
Matt Clay 955d771fbf
Update Ansible release version to v2.16.6.post0. (#83048) 8 months ago
Matt Davis 5bd74a531f
New release v2.16.6 (#83045) 8 months ago
Abhijeet Kasurde 16a89780ed
[stable-2.16] Fixes permission for cache json file to 644 (#83017)
* Fixes permission for cache json file from 600 to 644 (#82761)

Until ansible-core 2.12 the facts cache file created by this module, have permission set as 644 which allows the other users to read the cache, since ansible-core 2.13, we create the temporary file, but we do not set the permission after renaming the temporary file.  Adding the line to set the permission to allow other users/groups to read this file.

* [bp-2.16] Fixes permission for cache json file to 644

Until ansible-core 2.12 the facts cache file created by this module, have permission set as 644 which allows the other users to read the cache, since ansible-core 2.13, we create the temporary file, but we do not set the permission after renaming the temporary file.  Adding the line to set the permission to allow other users/groups to read this file.

---------

Co-authored-by: Rudnei Bertol Junior <rudnei@redhat.com>
8 months ago
Brian Coca 1b860558e3
ansible-config: ensure we get templated default (#82974) (#83009)
AKA all defaults rendered

(cherry picked from commit 46137127a2)
8 months ago
Abhijeet Kasurde 09f4549859
[bp-2.16] facts: Add a generic detection for VMware product name (#83024)
* Use startswith instead of hardcoded values in VMWare product
  detction

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
8 months ago
Martin Krizek e6361322e3
2.16: dnf5: replace removed API calls and add fallbacks (#83026)
* dnf5: replace removed API calls (#83020)

* dnf5: replace removed API calls

bfb6f32e15
96c9188f9c

* call set_group_with_name instead of setting group_with_name

c7b88428f3

---------

Co-authored-by: Matt Martz <matt@sivel.net>
(cherry picked from commit 4e57249d59)

* Fallbacks for brand new APIs that don't exist in released dnf5 (#83022)

(cherry picked from commit 57750e2cf7)

---------

Co-authored-by: Matt Martz <matt@sivel.net>
8 months ago
Felix Fontein e631b5b36a
Do not mangle plugin names in collections that start with an underscore. (#82574) (#82885)
(cherry picked from commit c0821346fc)
8 months ago
Brian Coca e70203300a
Unarchive get zipinfo on more OS/distros (#82873) (#82877)
Not all implementations use -l as default for -Z on unzip

(cherry picked from commit 481d8bdc1e)
8 months ago
Abhijeet Kasurde 416517c90e
[stable-2.16] find: do not fail on PermissionError (#82880)
* Log and skip permission errors on files and directories

Fixes: #82027


(cherry picked from commit f73d72e830)

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
8 months ago
Jordan Borean edbb6d1d59
Allow check mode async task disabling check_mode (#82827) (#82861)
* Allow check mode async task disabling check_mode

Allows running an async task with check_mode: False when the playbook is
being run in check mode.

* Add check_mode attribute to internal cleanup task

(cherry picked from commit c9086061ca)
8 months ago
Felix Fontein 9b77492e96
blockinfile: do not crash when filename has no path (#81638) (#82869)
* Do not crash when filename has no path.

* Clean up file after test.

(cherry picked from commit e659c23bf2)
8 months ago
Jordan Borean daf71c51e0
winrm - Handle task timeout (#82784) (#82864)
When using winrm over HTTP with message encryption enabled and a task
has timed out the connection plugin will fail to cleanup the WinRM
command. This will change that exception into a warning as a timeout is
already an exception event and a failure to clean the operation should
not override the timeout error shown.

(cherry picked from commit 8aecd1f9b2)
8 months ago
Brian Coca f8162c19a2
centralize and complete the internal static vars (#82872) (#82925)
* centralize and complete the internal static vars

These vars are internal and should not be overridden nor templated
from inventory nor hostvars.

(cherry picked from commit 8704b9fc29)
8 months ago
Sloane Hertel 85697beee0
fix handling allow_duplicates with the role cache (#82691) (#82927)
allow_duplicates is not part of the role uniqueness, so the value on the cached role may not match the current role.

* remove the allow_duplicates check from Role.has_run() which operates on the deduplicated role
* check the current role's allow_duplicates value in the strategy

(cherry picked from commit b3d8cdde5d)

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
8 months ago
Sloane Hertel 6ac75a20d0
Fix traceback inheriting from NetworkConnectionBase and add integration tests (#82954) (#82956)
(cherry picked from commit 4bddbe69d5)

Co-authored-by: Jeroen van Bemmel <jvb127@gmail.com>
8 months ago
Matt Martz bdf45d1fbc
[stable-2.16] dnf: obey the keepcache setting (#82735) (#82964)
Fixes #81954
(cherry picked from commit 77ab7af)

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
8 months ago
Jordan Borean 5a3bcd4bac
fetch - add error check on calculated dest (#82970) (#82990)
Add explicit error when the calculated dest path for fetch becomes a
local directory. The existing behaviour will not be checked unlike when
the path did not end with a trailing slash.

(cherry picked from commit 179bc1dabd)
8 months ago
Matt Martz 1e03880b6f
Update Ansible release version to v2.16.5.post0. (#82910) 8 months ago
Matt Martz ee04df4796
New release v2.16.5 (#82907) 8 months ago
Matt Clay d469cffff5
[stable-2.16] ansible-test - Fix Alpine libexpat bootstrapping (#82896)
(cherry picked from commit ca168eb367)
8 months ago
Matt Martz a1e5c83223
Update Ansible release version to v2.16.5rc1.post0. (#82843) 9 months ago
Matt Martz a1e38ba26b
New release v2.16.5rc1 (#82839) 9 months ago
Matt Martz 4bf051486e
[stable-2.16] Harden the ansiballz and respawn python templates (#81753) (#82747)
Harden our python templates for respawn and ansiballz around str literal quoting
(cherry picked from commit 7c73855)
9 months ago
Jordan Borean 00d6f00a43
Re-enable psrp tests that were disabled (#82785) (#82788)
(cherry picked from commit bb030db546)
9 months ago
Jordan Borean 075623770d
Avoid winrm hang on stdin write failure (#82766) (#82782)
If the connection plugin fails to write the data to run to stdin we will
only attempt to get the output with one operation attempt. If this times
out we will consider the command to have failed and raise an exception
instead of forever attempting to get the output.

(cherry picked from commit 942424e10b)
9 months ago
Martin Krizek 627a92e34a
Fix error when templating an unsafe string leading to a type error in Python (#82675) (#82745)
Fixes #82600

(cherry picked from commit 79ea21a39f)

Co-authored-by: Davide Sbetti <davide.sbetti@gmail.com>
9 months ago
Matt Martz eb73cc488b
[stable-2.16] Install crun from Alpine 3.19 for known musl compatibility (#82812) (#82814)
(cherry picked from commit 86f48a5)
9 months ago
Martin Krizek 56f31126ad
Prevent failures due to unsafe plugin name (#82759) 9 months ago
Matt Clay b65a6cd1b2
[stable-2.16] ansible-test - Add work-around for pytest>=8 errors (#82723) (#82727)
* ansible-test - Add work-around for pytest>=8 errors
* Update changelogs/fragments/ansible-test-pytest-8.yml

(cherry picked from commit a1edb61ce7)
9 months ago
Matt Martz 4a92114686
Update Ansible release version to v2.16.4.post0. (#82751) 9 months ago
Matt Martz 9f6649cadc
New release v2.16.4 (#82746) 9 months ago
Matt Martz 6ad778c6b5
[stable-2.16] Disable ansible-test podman container tests on Ubuntu 22.04 (#82748) (#82750)
(cherry picked from commit 9a8be1e)
9 months ago
Matt Martz f41469fe0c
Update Ansible release version to v2.16.4rc1.post0. (#82710) 9 months ago
Matt Martz 8c4aa28696
New release v2.16.4rc1 (#82709) 9 months ago
Mark Goddard 23d055e835
Fix issues with ansible-playbook-callbacks test (#82407) (#82630)
The timing of the async tasks was a little unpredictable, meaning that
sometimes we would get an unexpected number of v2_runner_on_async_poll
callbacks, and fail the test. This change fixes the issue by increasing
the poll interval to 2 seconds and the sleep duration to 3 seconds, such
that on a reasonably responsive system we will poll twice per task, with
the sleep ending in the middle of the two polls.

The include_me.yml file does not exist in this integration test. It has
been added.

The remote_tmp_dir.path expression is invalid - the setup_remote_tmp_dir
role uses set_fact to set remote_tmp_dir to remote_tmp_dir.path.

The integration tests run with ANSIBLE_HOST_PATTERN_MISMATCH=error,
meaning that the final play was never reached. Set
ANSIBLE_HOST_PATTERN_MISMATCH=warning to continue past the play and
trigger the v2_playbook_on_no_hosts_matched callback.

(cherry picked from commit 4a2de764ec)
10 months ago
Sloane Hertel 74f99dc36c
Fix ansible.builtin.include_vars - depth (#80995) (#82610)
* Changes as suggested by sivel

* Add changelog fragment and tests

Co-authored-by: Matt Martz <matt@sivel.net>
Co-authored-by: s-hertel <19572925+s-hertel@users.noreply.github.com>
(cherry picked from commit 48bed1e15a)

Co-authored-by: tachyontec <92679798+tachyontec@users.noreply.github.com>
10 months ago
Martin Krizek c93234304b
Do not ignore SyntaxError from jinja2.Environment.from_string (#82607) (#82614)
Jinja may generate an invalid Python source code from a template. Trying
to compile such source code into a Python code object results in
SyntaxError being thrown. An example of such a template is providing the
same keyword argument into a lookup twice, resulting in:
`SyntaxError: keyword argument repeated`.

Since `jinja2.exceptions.TemplateSyntaxError` does not cover such a
case, as it is not a Jinja parsing error, we need to catch SyntaxError
explicitly ourselves.

Fixes #82606

(cherry picked from commit 6d34eb88d9)
10 months ago
Sloane Hertel add76f36f5
fix loading vars_plugins in roles (#82273) (#82609)
* Fix loading legacy vars plugins when the plugin loader cache is reset

* Remove extra cache layer by ensuring vars plugin names are cached (stateless or not) so that the plugin loader cache can double as the load order

(cherry picked from commit 13e6d8487a)
10 months ago
Sloane Hertel 9a07ab72b4
[2.16] expect - fix argument spec error with timeout=null (#82522) (#82608)
* expect - fix argument spec error with timeout=null (#82522)

* Fix using timeout=null to wait indefinitely

* fix error message

(cherry picked from commit da9edd7760)

* python2-ify
10 months ago
Maxwell G 3e3c29b86e
changelog: use correct spelling for possessive pronoun its (#82594) 10 months ago
Matt Martz 10211fcf02
Update Ansible release version to v2.16.3.post0. (#82622) 10 months ago
Matt Martz df6c5244ef
New release v2.16.3 (#82619) 10 months ago
Matt Martz 5bef147a5d
Update Ansible release version to v2.16.3rc1.post0. (#82591) 10 months ago