Commit Graph

11847 Commits (cf15cd7d44cb349659cd089c10e26de712632e38)

Author SHA1 Message Date
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
Matt Clay 71f3f1601a
[stable-2.14] Convert non-docs *.rst files to *.md (#81217) (#81223)
* [stable-2.14] Convert non-docs *.rst files to *.md (#81217)

* Rename README.rst to README.md

* Change README format from reStructuredText to Markdown

* Fix whitespace in README.md

* Update setup.cfg to use README.md

* Replace changelog placeholder with README.md

* Update package-data sanity test
(cherry picked from commit 38e50c9f81)

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

* Remove README.rst from MANIFEST.in
1 year ago
Matt Clay a5010e1630
[stable-2.14] Add missing skip entries for selinux module_util (#81305) (#81308)
(cherry picked from commit 18cbfc688b)
1 year ago
Matt Clay bff040a0b6
[stable-2.14] ansible-test - Pre-build PyYAML wheels (#81300) (#81310)
This works around Cython failures when attempting to install PyYAML >= 5.4 <= 6.0..
(cherry picked from commit e964078a83)
1 year ago
Matt Clay f2246d3a3f
[stable-2.14] Disable cron integration test on Alpine (#81301) (#81303)
The tests are now failing due to the lack of `libfaketime` in the Alpine repos.
(cherry picked from commit 261a12b8a9)
1 year ago
Sviatoslav Sydorenko 50390e40ee
Replace `reboot_command` integration test with unit tests (#78956) (#81267)
Co-authored-by: Matt Clay <matt@mystile.com>

(cherry picked from commit b6ebb9d41a)
1 year ago
Matt Clay b5ad911da8
[stable-2.14] Use *.md instead of *.rst for test READMEs (#81009) (#81230)
(cherry picked from commit 6ac0ea3567)
1 year ago
Martin Krizek 5cd02deacf
Re-introduce RHEL 9 modularity testing in CI (#81160) (#81193)
(cherry picked from commit 7b2647f3b2)
1 year ago
Matt Martz 939370ea32
[stable-2.14] Resolve issues on python pre-3.10.6 with collection dirs longer than 100 characters (#81061) (#81073)
(cherry picked from commit 56b67cc)
1 year ago
Matt Clay 178acc3805
[stable-2.14] ansible-test - Avoid using atexit module (#81096) (#81098)
(cherry picked from commit c3926268e2)
1 year ago
Matt Davis fb91d25257
Remove straight.plugin dependency (#80084) (#81019)
(cherry picked from commit f587856)
1 year ago
Matt Martz 5e347b0439
[stable-2.14] URI Module find json sub type (#80745) (#80870)
* uri: fixed search for json types to include strings in the format xxx/yyy+json
(cherry picked from commit 0c7361d)

Co-authored-by: Brent Barbachem <barbacbd@dukes.jmu.edu>
2 years ago
Matt Clay a22c346620
[stable-2.14] ansible-test - local change detection without --fork-point (#79734) (#80900)
(cherry picked from commit a5bb4c7dee)

Co-authored-by: Felix Fontein <felix@fontein.de>
2 years ago
Matt Clay 45df7a9534
[stable-2.14] ansible-test - Fix traceback when mixing sources (#80801) (#80828)
* ansible-test - Fix traceback when mixing sources

* ansible-test - Refactor layout error handling

(cherry picked from commit b16041f1a9)
2 years ago
Matt Clay 016fbec2a5
[stable-2.14] ansible-test - Fix handling of long timeouts (#80769) (#80773)
(cherry picked from commit aacab0633a)
2 years ago
Matt Clay 5ab8903d58
[stable-2.14] ansible-test - Fix timeout handling (#80764) (#80766)
(cherry picked from commit 4c6aa70662)
2 years ago
Matt Clay 85644ca5e8
[stable-2.14] ansible-test - Avoid use of deprecated utcnow (#80750) (#80758)
The timestamps are only used by ansible-test, not the junit callback, so this change only impacts ansible-test.

(cherry picked from commit fd341265d0)
2 years ago
Martin Krizek 4008335f41
Account for overlays when interacting with Jinja envs (#80705) (#80717)
Instead of using Templar.environment in Templar.do_template for
accessing/mutating the environment, myenv local variable should be used
because it is the environment used for actual templating. It can either
point to Templar.environment or newly created environment overlay.

Fixes #80605

(cherry picked from commit 8cd95a8e66)
2 years ago
Matt Clay db039c1744
[stable-2.14] ansible-test - Use FreeBSD packaged setuptools (#80615) (#80617)
This will avoid issues during bootstrapping caused by breaking changes in setuptools.

(cherry picked from commit abc58c026b)
2 years ago
Brian Coca ba487253bb
password lookup, handle ident properly when saved (#80251) (#80310)
* password lookup, handle ident properly when saved (#80251)

* password lookup, handle ident properly when saved

  Currently we format and save ident when present but we didn't account for this when reading the saved file
  Also added some more robust error handling.

(cherry picked from commit 0fd88717c9)

* fix try block indent# https://chris.beams.io/posts/git-commit/

* clog

(cherry picked from commit 97c8da7783)

* fix bad merge indentation
2 years ago
Martin Krizek d5a36b8734
Change ansible_job_id format (#79951) (#80282)
* Change ansible_job_id format

...to be something that does not resemble float or other type which
value could be changed by literal_eval that jinja2_native uses.

Specifically the format of '%d.%d' is converted from str to float and
then back to float which may result in truncating the number resulting
in the job not being found because the job id does not exist.

(cherry picked from commit 09e0fb3516)
2 years ago
Sloane Hertel 62a353c085
fix using templated values for include/import role FA (#80320) (#80378)
* fix using templated values for include/import role options 'public', 'allow_duplicates', and 'rolespec_validate'

* pass templated values without changing the instance

* Fix templating by setting always_post_validate to True and calling IncludeRole.post_validate() instead

ci_complete

* add changelog

(cherry picked from commit 666188892e)
2 years ago
Jordan Borean 495d48d51e
Ansible.Basic - Improve temporary file cleanup process (#80293) (#80324)
* Ansible.Basic - Improve temporary file cleanup process

* Add comment on struct value used

(cherry picked from commit ba4505f5cb)
2 years ago
Sloane Hertel 4aa682003d
Fetch signatures from galaxy after the dependency resolver runs (#80334) (#80398)
Reduce the number of Galaxy API calls made during dependency resolution by fetching remote signatures afterwards, since these are not used in backtracking.

Reduce the verbosity to `-vvvv` (to match other Galaxy API calls) to see this activity.

Co-authored-by: Sviatoslav Sydorenko <webknjaz@redhat.com>
(cherry picked from commit 460abe0cef)
2 years ago
Matt Clay c4b33c7ce8
[stable-2.14] ansible-test - Add support for argcomplete 3 (#80482) (#80485)
(cherry picked from commit 0371ea08d6)
2 years ago
Matt Clay fb76b9e8a4
[stable-2.14] ansible-test - Fix packaging change classification (#80360) (#80361)
(cherry picked from commit 5d64024f1a)
2 years ago
Felix Fontein 08297ce0db
[2.14] ansible-doc: fix broken seealso links in text output (#80285)
* ansible-doc: fix broken seealso links in text output (#80280)

* Fix broken URLs.

* Also remove auto-generated description for modules outside ansible.builtin.

(cherry picked from commit fafb23094e)

* Fix URL processing. (#80295)

(cherry picked from commit 086ae42209)
2 years ago
Matt Clay 7bb078bd74
[stable-2.14] Fix url lookup test to use test container (#80284) (#80287)
(cherry picked from commit 054aa92158)
2 years ago
Matt Clay 9f723d7123
[stable-2.14] 📦 Switch sdist build-system to pure setuptools (#80255) (#80261)
* [stable-2.14] 📦 Switch sdist build-system to pure setuptools (#80255)

This patch modifies the in-tree build backend to build sdists that swap
out pointers to it in the `pyproject.toml`'s `[build-system]` section.

The effect of this is that the first build from source (for example,
from a Git checkout) uses our PEP 517 in-tree build backend. But the
produced tarball has `build-backend` set to `setuptools.build_meta`
which is the native build backend of `setuptools`. So any following
builds from that sdist will skip using the in-tree build backend,
calling the setuptools' one.
The good news is that if the first build generated the manpages, they
will be included and won't go anywhere even though, a different build
system is in place.

Combined with #80253, this will make sure not to modify the current
source checkout on that first build.

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

Co-authored-by: Sviatoslav Sydorenko <webknjaz@redhat.com>

* Make PEP 517 mutation tests use pinned old setuptools (#80262)

* Pin setuptools to lowest supported @ PEP 517 test

This allows catching the behavior of builds under old setuptools.

* Stop invoking `setup.py install` in tests

This is not the part we care about since it involves dealing with the
external runtime dependencies rather than building our source
distribution.

(cherry picked from commit eebfd71a6d)

---------

Co-authored-by: Sviatoslav Sydorenko <webknjaz@redhat.com>
2 years ago
Martin Krizek ddbad58428
Use FAs with inheritance only when applicable (#80026) (#80076)
... and set default value of an attribute on an object
only in NonInheritableFA.

Fixes #79777

ci_complete

(cherry picked from commit 6c3d2a4e51)
2 years ago
Sloane Hertel 1d3800a8d7
copy - fix check mode with remote_src=True (#78624) (#80176)
* Don't create dest directory in check mode

uncomment existing test

Fix checking for file attribute changes in check mode and add a test

(cherry picked from commit b7a0e0d792)
2 years ago