Commit Graph

11877 Commits (v2.14.18)

Author SHA1 Message Date
Sloane Hertel 9201aeb6cf
Fix ansible-vault integration test for missing vault ids (#83777) (#83785)
* Fix broken, circumvented test for missing vault ids

* verify the command returns a non-zero exit code

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit fe7e68bfcb)
1 month ago
Matt Clay 435dba3c35
[stable-2.14] ansible-test - Improve container probe error handling (#84109) (#84189)
(cherry picked from commit 48be6f8b6f)
1 month ago
Matt Davis 62682c3029
[stable-2.14] Preserve `_ansible_no_log` from action result; fix `include_vars` to set properly (#84143) (#84183)
* fixes for CVE-2024-8775

* propagate truthy `_ansible_no_log` in action result (previously superseded by task-calculated value)
* always mask entire `include_vars` action result if any file loaded had a false `show_content` flag (previously used only the flag value from the last file loaded)

* update no_log tests for CVE-2024-8775
* include validation of _ansible_no_log preservation when set by actions
* replace static values with dynamic for increased robustness to logging/display/callback changes (but still using grep counts :( )

* changelog

* use ternary, coerce to bool explicitly
(cherry picked from commit c9ac477e53)
1 month ago
Brian Coca 03daf774d0
[stable-2.14] user action, fix ssh-keygen issues (#84167)
* user module avoid conflicts ssh pub key (#84165)

Remove pub key if we are going to generate private
fix tests for os X

(cherry picked from commit 11e4a6a722)

* old python, no f''

* Restore test import missing from backport

---------

Co-authored-by: Matt Clay <matt@mystile.com>
1 month ago
Sviatoslav Sydorenko (Святослав Сидоренко) 71a2eba2e6
[2.14] Trim `selinux_policytype` @ integration tests (#84141)
The shell command sometimes prints a trailing whitespace which breaks
the tests on old RHELs. This patch is supposed to fix that.

(cherry picked from commit cd74c4bcd5)
1 month ago
Matt Clay dbd928cad9
[stable-2.14] release.py - Auto-update setuptools upper bound (#83713) (#83745)
* [stable-2.14] release.py - Auto-update setuptools upper bound (#83713)

When releases are prepared, the upper bound on setuptools in pyproject.toml will be automatically updated
to the latest version available on PyPI. This version will then be tested by the package-data sanity test
during the release process and will be used to build the release.

This change ensures that a released version of ansible-core can be built in the future if a new setuptools
release includes breaking changes that would prevent building a functional package. If a downstream package
maintainer requires a newer setuptools version than the upper bound permits, they can patch pyproject.toml
as needed. Since ansible-core releases support specific Python versions, lack of support for new setuptools
releases will have no effect on support for future Python versions.

(cherry picked from commit 4e69d83fac)

* release.py - Add missing setuptools arg to prepare (#83887)

* release.py - Add missing setuptools arg to prepare

This allows the prepare command to accept the `--no-setuptools` argument.

It also fixes a traceback when using the `prepare` command.

* Use a more accurate type hint

(cherry picked from commit b544ac13ec)

* release.py - Include pyproject.toml in git add (#83892)

(cherry picked from commit e3ccdaaa2e)
2 months ago
Matt Clay efa49d745b
[stable-2.14] tests: use keyserver with keyid while using apt_key (#83694) (#83704)
(cherry picked from commit 3daf01e270)

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
4 months ago
Matt Clay 3566e742de
[stable-2.14] ansible-test - Remove VyOS tests and support files (#83650) (#83654)
The VyOS remote image required for running the tests is no longer functional.
(cherry picked from commit 79f819dc54)
4 months ago
Matt Clay 5800d3bf04
[stable-2.14] Use build instead of pep517 for integration test (#83641)
(cherry picked from commit f261a6142f)
4 months ago
Sviatoslav Sydorenko (Святослав Сидоренко) 9bc9f083c8
[2.14] 🧪 Switch CentOS 7 yum repo mirrors to the vault (#83526)
The distro itself reached EoL on June 30, 2024, but these repository
archives live on and should remain usable for testing.

Refs:
* https://www.redhat.com/en/topics/linux/centos-linux-eol
* https://github.com/ansible/pylibssh/commit/01d3442f
* https://gist.github.com/hkneptune/4961532c2df691db79a1c6b72c251b25
* https://vault.centos.org/7.9.2009/

(cherry picked from commit c8c45cdfb4)

(PR #83523)
5 months ago
Matt Clay 57fad4be34
[stable-2.14] ansible-test - Update PyPI test container to 3.1.0 (#83432). (#83443)
(cherry picked from commit 5af5b4b6c8)
6 months ago
Matt Clay a8ceb44a52
ansible-test - Drop Windows 2012/2012-R2 support (#83380) 6 months ago
Matt Clay 63df21e9cb
[stable-2.14] ansible-test - Use PyPI proxy for centos7 (#83226) (#83229)
(cherry picked from commit c0f7e9cc2c)
7 months ago
Sloane Hertel c96341e8e6
Fix installing roles containing symlinks (#82911) (#83139)
* 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
Matt Martz a12c3b24a0
[stable-2.14] Don't hardcode the dnf module, dynamically select one (#83183). (#83187)
(cherry picked from commit dc6b77beca)
7 months ago
Felix Fontein 10460de6e6
Do not mangle plugin names in collections that start with an underscore. (#82574) (#82887)
(cherry picked from commit c0821346fc)
8 months ago
Jordan Borean 10005e883e
winrm - Handle task timeout (#82784) (#82862)
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
Matt Clay 4a99568fa3
[stable-2.14] ansible-test - Fix Alpine libexpat bootstrapping (#82898)
* [stable-2.14] ansible-test - Fix Alpine libexpat bootstrapping

(cherry picked from commit ca168eb367)

Co-authored-by: Matt Clay <matt@mystile.com>

* Alpine 3.16 has `expat` instead of `libexpat`
8 months ago
Jordan Borean fa58e635bc
Re-enable psrp tests that were disabled (#82785) (#82786)
(cherry picked from commit bb030db546)
9 months ago
Martin Krizek 3d263f8330
Prevent failures due to unsafe plugin name (#82759) (#82791)
(cherry picked from commit 56f31126ad)
9 months ago
Matt Martz cb82ddec02
[stable-2.14] Install crun from Alpine 3.19 for known musl compatibility (#82812). (#82816)
(cherry picked from commit 86f48a526a)
9 months ago
Matt Clay 9e1fd8f2f0
[stable-2.14] ansible-test - Add work-around for pytest>=8 errors (#82723) (#82729)
* 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 93a5f75ae3
[stable-2.14] Disable ansible-test podman container tests on Ubuntu 22.04 (#82748) (#82754)
(cherry picked from commit 9a8be1e)
9 months ago
Nilashish Chakraborty aa37f3cf25
[backport][stable-2.14] Support `action_plugin` in plugin_routing_schema (#82562) (#82583)
* Support `action_plugin` in plugin_routing_schema (#82562)

now validation schema matches reality

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
Co-authored-by: s-hertel <19572925+s-hertel@users.noreply.github.com>
(cherry picked from commit b01f1f207c)

* Module redirects should be FQCR

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* pep8 fixes

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

---------

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
10 months ago
Matt Martz beb04bc264
[stable-2.14] Ensure ANSIBLE_NO_LOG is respected (CVE-2024-0690) (#82565) (#82568)
(cherry picked from commit 6935c8e)
11 months ago
Sloane Hertel 080c3ce90c
Targeted fix for installing roles with symlinks containing '..' (#82165) (#82325)
Set the tarfile attribute to a normalized value from unfrackpath instead
of validating path parts and omiting potentially invald parts

Allow tarfile paths/links containing '..', '$', '~' as long as the
normalized realpath is in the tarfile's role directory

(cherry picked from commit 3a42a00368)
11 months ago
Matt Martz 14c0916f0a
Enable directly using `AnsibleUnsafeText` with Python `pathlib` (#82510) (#82564)
* Enable directly using `AnsibleUnsafeText` with Python `pathlib`. Fixes #82414.
(cherry picked from commit c6a652c081)
11 months ago
Abhijeet Kasurde 69d08cf8de [backport-2.14] CI: remove FreeBSD 12.4 from test matrix (#81315)
Fixes: #80417

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 11e261b54f)
11 months ago
Matt Martz 49c05da2d2
[stable-2.14] Additional Unsafe fixes (#82376) (#82381)
* Allow older pickle protocols to pickle unsafe classes. Fixes #82356

* Address issues when iterating or getting single index from AnsibleUnsafeBytes. Fixes #82375

* clog frag
(cherry picked from commit afe3fc1)
12 months ago
Sviatoslav Sydorenko (Святослав Сидоренко) 01b7d928aa
[backport-2.14] Replace FreeBSD 13.1 with 13.2 in CI and ansible-test (#82398)
* [backport-2.14] Add FreeBSD 13.2 to ansible-test (#80698)

(cherry picked from commit d12aa7f69c)

* [backport-2.14] remove Freebsd 13.1 from test matrix (#81058)

* remove Freebsd 13.1 from test matrix

fixes #80416

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit 534f688a53)

* Revert to the original Python versions for the branch

Co-authored-by: Matt Martz <matt@sivel.net>

---------

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
Co-authored-by: Matt Martz <matt@sivel.net>
12 months ago
Sviatoslav Sydorenko cf15cd7d44
[backport][stable-2.14] 🧪 Replace GitHub SVN integration test with local TLS (#82370)
* [backport][stable-2.14] 🧪 Replace GitHub SVN integration test with local TLS

PR #82334

* Run svn integration test locally with TLS

This patch uses a `trustme` to make an ephemeral CA, and server, and
client TLS artifacts for testing. These are integrated into the Apache
web server via it's `mod_ssl`.

Resolves #82207

* Replace GitHub SVN HTTPS URL w/ localhost over TLS

This change gets rid of the need to use GitHub, which is just about to
drop support for SVN [[1]]. Moreover, it eliminates the need to use
external network for any SVN commands in the test.

[1]: https://github.blog/2023-01-20-sunsetting-subversion-support/

(cherry picked from commit dd0138ba21)

* Implement compat w/ opensuse15, centos7 & rhel7/8
12 months ago
Matt Martz fc130b6bfc
[stable-2.14] Install upgraded crun from edge (#81833). (#82342)
(cherry picked from commit e78cc1e602)
1 year ago
Matt Martz 7239d2d371
Ensure that unsafe is more difficult to lose [stable-2.14] (#82295)
* Ensure that unsafe is more difficult to lose

* Add Task.untemplated_args, and switch assert over to use it
* Don't use re in first_found, switch to using native string methods
* If nested templating results in unsafe, just error, don't continue

(cherry picked from commit 586f1924512b01305f896d9ae4732773023013a3)

* ci_complete
1 year ago
Brian Coca de07dc85f5
ansible-pull: expand destinantion directoy to avoid purgin in / (#82030) (#82223)
* expand destinantion directoy to avoid purgin in /

  bad things could happen and help alone is not enough

(cherry picked from commit 8825e60add)
1 year ago
Matt Clay 6bf67bb4c8 [stable-2.14] ansible-test - Fix parsing of cgroup entries
(cherry picked from commit e933d9d8a6)

Co-authored-by: Matt Clay <matt@mystile.com>
1 year ago
Matt Clay 093d26b2a2 [stable-2.14] Fix subversion integration test (#82029)
- Remove dependency on the htpasswd module (and thus passlib)
- Fix setup/teardown of the httpd process
- Fix cleanup of temporary directories.
(cherry picked from commit 09d943445c)

Co-authored-by: Matt Clay <matt@mystile.com>
1 year ago
Matt Clay 82e5816aac
ansible-test - Use Azure for Windows 2012/2012-R2 (#81972) 1 year ago
Jordan Borean f17b564448
win_fetch - improve test time by not scanning Win dir (#81884) (#81886)
(cherry picked from commit dfc62589f6)
1 year ago
Matt Davis 150def6015
fix various Jinja plugin caching issues (#79781) (#81644)
* fix various Jinja plugin caching issues

* consolidate the wrapper plugin cache
* remove redundant cache in J2 filter/test interceptor

* intra-template loader bypass

* fix early exits swallowing some exception detail

* misc comment cleanup

(cherry picked from commit dd79c49a4d)
1 year ago
Matt Martz 6809f986fc
[stable-2.14] Prevent roles from using symlinks to overwrite files outside of the installation directory (#81780) (#81786)
* Sanitize linkname during role installs

* Add tests

* add clog frag.
(cherry picked from commit ddf0311c63)
1 year ago
Matt Martz b4b600a70b
[stable-2.14] tarfile: Handle deprecation warning for extract and extractall (#81545) (#81633)
* Python 3.11.4 introduces a new parameter 'filter' in extract and
extractall in tarfile. Handle deprecation warning message emitted
in Python 3.12.
* added probing mechanism in ansible-galaxy code to detect broken
data filter implementation in tarfile.

Fixes: #80832



(cherry picked from commit 1cc5efa)

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
1 year ago
Jordan Borean 7d48bef252
PowerShell - remove uneeded dotnet code for future compatibility (#81472) (#81576)
(cherry picked from commit f3976117fb)
1 year ago
Matt Clay e7f64ed9d5
[stable-2.14] ansible-test - Always use managed entry points (#81537) (#81540)
(cherry picked from commit 390e508d27)
1 year ago
Sviatoslav Sydorenko 4cbdf02efe
Replace FreeBSD 12.3 w/ 12.4 in CI & ansible-test (#81497)
FreeBSD 12.3 bootstrap packages stopped being available.
1 year ago
Matt Clay cf6df70765
[stable-2.14] Overhaul package-data sanity test (#81427) (#81438)
The sanity test now only inspects the sdist and wheel instead of trying to install the sdist using setup.py..
(cherry picked from commit f894ce89b4)
1 year ago
Matt Clay 470be95257
[stable-2.14] ansible-test - Update source layout detection (#81418) (#81435)
(cherry picked from commit c525514994)
1 year ago
Matt Clay a2ceacd75d
[stable-2.14] Clean up MANIFEST.in (#81415)
* Clean up MANIFEST.in (#80688)

* Remove unnecessary MANIFEST.in commands

This eliminates more setuptools warnings during build.

* Sort MANIFEST.in

Now that only include commands are used, the order of the commands no longer effects the build output.

(cherry picked from commit 6e325d9e4d)

* Omit hacking directory from MANIFEST.in (#81245)

* Omit `hacking` directory from `MANIFEST.in`

* Update package-data sanity test

(cherry picked from commit b93a628aed)
1 year ago
Martin Krizek 2d4d354cb1
Remove BOTMETA.yml and sanity tests for it (#81198) (#81264)
(cherry picked from commit 39ef570e16)
1 year ago
Matt Clay dd45caa7a9
[stable-2.14] Docs removal and other backports (#81407)
* Remove straight.plugin dependency (#80084)

(cherry picked from commit f587856beb)

* Update package-data sanity test (#80344)

The test no longer relies on the Makefile.

(cherry picked from commit 46362bbd27)

* Remove obsolete release bits (#80347)

Releases are now built using the `packaging/release.py` tool.
This makes the `Makefile` and associated files in `packaging/release/` and `packaging/sdist/` obsolete.

* Use --no-isolation for package-data sanity test (#80377)

The dependencies are already in the sanity test venv. This avoids use of unpinned dependencies and a dependency on a network connection.

(cherry picked from commit 7fcb9960e6)

* Set the minimum setuptools to 45.2.0 (#80649)

Also update the package-data sanity test to use the minimum setuptools version.

(cherry picked from commit 4d25e3d54f)

* Use package_data instead of include_package_data (#80652)

This resolves warnings generated by setuptools such as the following:

_Warning: Package 'ansible.galaxy.data' is absent from the `packages` configuration.

(cherry picked from commit 5ac292e12d)

* Fix os.walk issues in package-data sanity test (#80703)

* Remove `docs` and `examples` directories (#81011)

* Remove docs dir

* Updates to reflect docs removal

* Fix integration test

* Remove examples dir

* Updates to reflect examples removal

* Remove build_library and build-ansible.py

* Remove refs to build_library and build-ansible.py

* Remove obsolete template

* Remove obsolete template reference

* Remove the now obsolete rstcheck sanity test

(cherry picked from commit 72e038e823)

* Omit pre-built man pages from sdist (#81395)

Since man pages aren't accessible to users after a `pip install`, there's no need to include them in the sdist.
This change makes it trivial to build man pages from source, which makes them much easier to iterate on.
It also simplifies creation and testing of the sdist, since it no longer requires building man pages.

The new `packaging/cli-doc/build.py` script can generate both man pages and RST documentation.
This supports inclusion on the docs site without a dependency on `ansible-core` internals.
Having a single implementation for both simplifies keeping the two formats in sync.

(cherry picked from commit 691c8e8603)
1 year ago
Matt Clay b660c7ec1e
[stable-2.14] ansible-test - update module_utils/urls.py unit test to support cryptography >= 41.0.0 (#81296) (#81317)
(cherry picked from commit d20a0c02cc)

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
1 year ago