Commit Graph

12635 Commits (a0495fc31497798a7a833ba7406a9729e1528dd8)

Author SHA1 Message Date
Jordan Borean b5e0293645
powershell - Improve CLIXML parsing (#83847)
Improves the logic used when parsing CLIXML to support all escaped
character sequences and not just newlines.
3 months ago
Jordan Borean 69fb629355
Fix up raw_params for ansible.windows modules (#83830)
* Fix up raw_params for ansible.windows modules

Fixes up the logic for detecting if using ansible.windows.win_command or
ansible.windows.win_shell with _raw_params. These two modules are
special in that they can be referenced in 4 different ways but the
ansible.windows collection specific prefix needs to be manually added to
the list.

* Fix up sanity issue
3 months ago
Brian Coca 718ce13673
connection plugins: extras fix (#83353)
Currently we match the load name, which can be an fqcn, but most users expect the 'naked' name
Now plugins can declare that name by setting _extras_prefix property or fallback to 'non fqcn' if no extras prefix
3 months ago
Brian Coca 90de03be50
Gather mount facts, fallback for when multiproc is not feasable (#83750)
* fallback to 'single threaded gathering' for when multiproc fails

Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
3 months ago
Jordan Borean 520fa688ba
ssh and psrp - Support more complex characters in fetch_file (#83753)
* ssh and psrp - Support more complex chars in fetch_file

Fixes the psrp and ssh (with piped) fetch function to work with paths
that contains glob like characters in the path. For Windows this was
needed when using paths that contain `[]` in the path. For ssh this was
a problem with FreeBSD when using the piped transfer method with similar
characters.

Also tidies up the psrp logic to not inject the paths and buffer size
in the script but pass it as an object through an argument/parameter.

* Fix sanity check
3 months ago
Jordan Borean dec49e6288
Add explicit winrm/psrp tests for HTTP and HTTPS (#83769) 3 months ago
Jordan Borean 430aaa1960 Fix tests when running against SSH target 3 months ago
Matt Clay 81e025b414 ansible-test - Add Windows remote connection option 3 months ago
Matt Clay a3ee846a64
Use a venv in more integration tests (#83799)
* Use venv for pause test
* Use venv for debugger test
* Use venv for builtin_vars_prompt test
3 months ago
Matt Clay 6eb16faed2
ansible-test - Update base/default containers (#83796) 3 months ago
Matt Clay da02611c48
ansible-test - Update sanity test requirements (#83795)
* Remove PyYAML pin for yamllint sanity test
* Freeze sanity test requirements
3 months ago
Matt Clay ab624ad031
ansible-test - Remove generation of egg-info (#83786)
Also remove egg-info generation from hacking/env-setup scripts.
3 months ago
dkuji 26375e7f12
fix copy module update atime/mtime (#83235)
Ensure we force mtime/atime update when using copystat

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
3 months ago
Martin Krizek 89137cb5a0
Add end_role meta task (#83263)
ci_complete
3 months ago
Sloane Hertel fe7e68bfcb
Fix ansible-vault integration test for missing vault ids (#83777)
* 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>
3 months ago
Martin Krizek 9a54ba5a39
Ensure skipped loop iteration register var is available (#83756)
Fixes #83619
3 months ago
Martin Krizek 5c84220dbb
Fix meta tasks breaking host/fork affinity with host_pinned (#83438)
Fixes #83294
3 months ago
Martin Krizek a0f9bbf3f3
ini lookup: add new interpolation option (#83773)
Fixes #83755
3 months ago
Matt Clay 68515abf97
Drop use of setup.py and setup.cfg (#81443) 3 months ago
Sloane Hertel 2b91c57c85
atomic_move - fix creating file in directory with setgid bit (#83718)
* fix creating file in directory with setgid bit

* add a test using the copy module's content option to create a file in a directory with setgid bit

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
3 months ago
Kellin 0d6b034103
Enable validation of subkeys in rpm key module (#83716)
* Enable validation of subkeys in rpm key module

A gpg subkey may change while the primary key remains the same. Due to
this behavior, there are situations where validation of the primary gpg
key fingerprint is not sufficient because the desired target is actually
the gpg subkey. This change allows the user to validate against either
the fingerprint of the primary gpg key or its subkey.

Signed-off-by: Kellin <kellin@retromud.org>

* Improve tests, add multi-fingerprint

- Improve tests to cover all cases
- add multi fingerprint validation

Signed-off-by: Kellin <kellin@retromud.org>
3 months ago
Brian Coca e4d7286298
use diff intermediate var to preserve functionality (#83738)
add tests
4 months ago
Brian Coca 797e6bb220
Add vaulted_file test (#83717)
* Add vaulted_file test
* fix is_encrypted_file while we are here
Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
4 months ago
Sloane Hertel 97a60c1e86
Fix csvfile test - quote file argument (#83751)
file was intended to be a string, not an undefined variable
4 months ago
Martin Krizek d9f1866249
Deprecate remaining safe evals (#83293) 4 months ago
Matt Clay 59ca05b709
ansible-test - Update default and distro containers (#83736) 4 months ago
Matt Davis a301ae876e
try disabling negative values win_reboot test (#83735)
* hoping to improve CI stability
4 months ago
Matt Clay 70be017f02
ansible-test - Update mypy and package-data tests (#83734)
* package-data - Test min/max setuptools version

* Fix multi-version abstraction

* Convert mypy test to script based test

* Fix f-string in pymarkdown test

* Sanity test fixes
4 months ago
Matt Clay 717f1092e3
ansible-test - Update venv management and sanity requirements (#83729)
* ansible-test - Update venv management
* Upgrade from pip 24.0 to 24.2
* Omit `wheel` and `setuptools` from ansible-test managed virtual environments
* Drop pre-release hacks
* Update mypy requirements
* Freeze sanity test requirements
* Update sanity test configuration
* Update sanity ignores
4 months ago
Sloane Hertel 0be66ed6dc
Fix task-adjacent search path in roles (#83621)
* Restore search path in the current task file’s directory for roles
4 months ago
Sloane Hertel 26c8a28d05
csvfile lookup - fix giving an error when no search term is provided (#83710)
Fixes #83689
4 months ago
Brian Coca c5210ad3eb
Fix display to log severity mapping (#83712)
add caplevel to display to pass through
also reverse dict order as 'last update wins'
added tests ... and also log severity to log

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
4 months ago
Matt Clay ac5ed40a21
Fix type hints and misc mypy/pylint issues (#83724) 4 months ago
Matt Clay 6019f3f425
ansible-test - Update coverage to 7.6.1 (#83723) 4 months ago
Matt Clay 4e69d83fac
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.
4 months ago
Abhijeet Kasurde 207a5fbebb
test: Handle Singleton Display class (#83673)
Fixes: #83538

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
4 months ago
Matt Clay 5ae8b5b3a6
Remove EXTERNALLY-MANAGED marker in apt test (#83706)
The marker is removed in ansible-test managed environments, but the apt test restores it
by installing/upgrading packages. To avoid breaking later tests, the marker needs to be
removed again.

ci_complete
4 months ago
Abhijeet Kasurde 245885177c
systemd facts: Handle AttributeError (#83684)
* Handle AttributeError raised while running systemd facts on
  non-systemd hosts

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
4 months ago
Abhijeet Kasurde 31ad786de1
ansible-doc: handle on_fail (#83676)
Handle errors raised when role doc has errors

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
4 months ago
skupfer 20465ba11a
Add UID and GID min/max keys (#81770)
Fixes: #72183
4 months ago
Karl G 6bf6844a1c
add error handling when parsing values in ini files (#82718)
Fixes: #82717

Co-authored-by: Karl A. Grindley <kgrindley@ll.mit.edu>
4 months ago
Abhijeet Kasurde c6d5be5cac
test: update tests (#83686)
* Remove commented code
* Enable disabled tests
* Formatting

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
4 months ago
Abhijeet Kasurde 3daf01e270
tests: use keyserver with keyid while using apt_key (#83694)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
4 months ago
Jordan Borean bbf96c250f
winrm - quota retry handling (#83656)
* winrm - quota retry handling

Add a retry attempt when receiving ERROR_WSMAN_QUOTA_MAX_OPERATIONS when
starting a command. This can occur when running a loop with multiple
iterations or an action plugin that runs multiple commands.

* Update pywinrm constraint for test

* Add verbose hint and mark test as destructive
4 months ago
Sloane Hertel ff5deaf62f
fix module_defaults group incorrectly giving deprecation warnings (#83510)
don't display deprecation warnings for actions/modules as a result of using an action_group containing a deprecated plugin
4 months ago
Martin Krizek 07a1d6a3fd
dnf/setup_rpm_repo: simplify dummy testing repos (#83624)
This change simplifies construction and footprint of testing rpm
repository created by rpmfluff:
* all packages default to noarch
* only when necessary build package for a specific architecture(s)
* do not build several repositories each for specific arch
* remove duplicate "incompatible arch" test
* skip_broken_and_nobest: move testing packages from an external repo
  into our dummy repo for transparency
* remove compatibility code from create_repo.py for versions no longer
  needed
* remove support for old OS versions from setup_rpm_repo
* simplify representation of an rpm in create_repo.py to allow easier
  changes

Notes
* there is one more external testing repo used at
https://ci-files.testing.ansible.com/test/integration/targets/setup_rpm_repo/repo-with-updateinfo
4 months ago
Felix Fontein 3d4bd79574
validate-modules: detect names set mismatch between argument spec and documentation (#83599) 4 months ago
Lee Garrett 7e3916b767
Typo fixes and other bits and bobs (#83672)
Co-authored-by: Lee Garrett <lgarrett@rocketjump.eu>
4 months ago
Abhijeet Kasurde 504f5b1230
apt: Report change when package is removed (#83547)
While upgrade process removes a package, module should
report changed=True instead of changed=False

Fixes: #46314

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
4 months ago
Abhijeet Kasurde cd105d479a
display: warn user about empty log path value (#83381)
Fixes: #79959

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
4 months ago
Matt Clay 79f819dc54
ansible-test - Remove VyOS tests and support files (#83650)
The VyOS remote image required for running the tests is no longer functional.
4 months ago
Alexei Znamensky d36dc70afc
remove ignore clauses for module find (#83575)
add testcase for expanding home dir names
4 months ago
Matt Clay f261a6142f Use build instead of pep517 for integration test 4 months ago
Matt Clay b90c3a8de5 Revert "🧪 Use `setuptools [core]` @ collections_runtime_pythonpath (#83627)"
This reverts commit 0d5460df16.
4 months ago
Sviatoslav Sydorenko (Святослав Сидоренко) 0d5460df16
🧪 Use `setuptools [core]` @ collections_runtime_pythonpath (#83627) 4 months ago
Alexei Znamensky eeb9b50669
remove ignore clauses for module lineinfile (#83595) 4 months ago
Peter A. Bigot c904bffc7d
debconf: handle boolean value representation consistently (#83601)
* lift code that normalizes value type for boolean vtype to cover both
  branches of conditional.
* remove obsolete and incomplete conversion of type in set_selection.

Fixes: #83594
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
4 months ago
Alexei Znamensky 4408b2c3e1
replace - fix documentation and remove ignore clauses (#83574) 4 months ago
Matt Clay 906c969b55
ansible-test - Improve unknown env error message (#83610) 4 months ago
Alexei Znamensky 08de64076a
remove ignore clauses for module blockinfile (#83577) 4 months ago
Martin Krizek 28cef00576
dnf: follow-up on is_newer_installed arches fix (#83556)
* dnf: follow-up on is_newer_installed arches fix

* fix for the non package object case

* prevent early bailout in dnf _is_newer_version_installed
* non-installed available arches would fail out of the check early

---------

Co-authored-by: Matt Davis <nitzmahone@redhat.com>
5 months ago
Matt Clay 9cdfcd9aed
ansible-test - Update nios-test-container to 4.0.0 (#83539) 5 months ago
Matt Clay 10997ab3aa
ansible-test - Update base/default containers (#83553) 5 months ago
Harshvardhan Sharma 43346f1fdc
Add SL-Micro to Suse family list (#83541) 5 months ago
MajesticMagikarpKing edce798713
Fix Creating user directory using tilde always reports "changed" (#83113)
Fixes: #82490
5 months ago
Felix Fontein e5309ba29f
validate-modules: reject option/alias names equal up to casing belonging to different options (#83530)
* Reject option/alias names equal up to casing belonging to different options.

* Update test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/main.py

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
5 months ago
flowerysong 63538f7779
package_facts: fix warning logic (#83520)
* package_facts: fix warning logic

* Refactor so that warnings can work
5 months ago
Martin Krizek 775bc1110e
linear: fix included handlers executing in lockstep (#83209)
Fixes #83019
5 months ago
Martin Krizek 571e2a9551
Fix incorrect rc when executing end_host in rescue (#83522)
Fixes #83447
5 months ago
Brian Coca 6c0f4c8a2d
hostvars templating fix, override serialization (#83509)
fixes #82872
nicer implementation courtesy of nitzmahone
5 months ago
Felix Fontein 7d678cbd96
Fix require_only_one. (#83511) 5 months ago
Brian Coca 00ddc27d69
actually show plugin config warnings/deprecations (#82593)
previouslly we recorded but did not show to avoid spam
since we could not dedup from forks, that was already
fixed in another PR so now we can show/display them.

Also:
  * funcitonalize deprecation msg construct from docs
  * reuse formatting func in cli
  * normalize alternatives: most of the code used intended plural
    but some and most data/tests used the singular
  * update schemas and tests

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
5 months ago
Martin Krizek a8e4106c47
Fix tb for when env var contains % (#83499)
Fixes #83498

Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
5 months ago
Martin Krizek 2930a4664c
dnf - arches must be the same in the is_newer_installed check (#83417)
Fixes #83406
5 months ago
Martin Krizek 0ee6e39615
dnf, dnf5: fix installing via wildcard (#83481)
Fixes #83373
5 months ago
Matt Clay 8f1fddb161
Enable Ubuntu 24.04 group 6 in CI (#83466)
* Enable Ubuntu 24.04 group 6 in CI

* Disable rootfull Podman on Ubuntu

* Disable unix-chkpwd AppArmor profile on Ubuntu for Fedora 40 tests

* Document AppArmor and rootfull issues
5 months ago
Brian Coca 0d28705ce5
linear strategy, show templated task name on start (#83473)
we only templated in some cases but when queueing we could get an untemplated name for the 'on start' event.
5 months ago
Brian Coca 339452c105
Ensure the correct connection name is shown in results (#83354) 5 months ago
Thomas Sjögren f7dee8aaf8
add support for inactive option (#83355)
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
5 months ago
Matt Clay a121a169e3
ansible-test - Replace FreeBSD 14.0 with 14.1 (#83477) 5 months ago
Abhijeet Kasurde c93af4e148
unarchive: handle content and size differences (#83454)
Consider content differs and size differs while unarchiving
the same tar.gz file

Fixes: #29610

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 months ago
Danilo Bargen c2c6005842
get_url: Verify checksum using tmpsrc, not dest (#64092)
Previously, if the checksum of the downloaded file did not match the
specified checksum, the *destination* file was removed. This possibly
leaves the system that is being provisioned in an invalid state.

Instead, the checksum should be calculated on the temporary file only.
If there's a mismatch, delete the *temporary* file, not the destination
file.

This requires checking the checksum before moving the file.
5 months ago
Matt Clay 96c04e9d1d
ansible-test - Update PyPI and utility container (#83475) 5 months ago
Felix Fontein 1b42af5004
ansible-test: update http-test-container to 3.2.0 (#83469) 5 months ago
MajesticMagikarpKing d62496fe41
human_to_bytes: strictly parse strings (#83403)
Fixes: #82075
5 months ago
Martin Krizek df29852f3a
Update the dnf5 copr repo (#83459)
The dnf-nightly is the official nightly repo now.
5 months ago
Matt Clay dad6f07731
ansible-test - Update tested platforms (#83446)
* ansible-test - Update tested platforms

* Add work-around for Alpine tests

* Fix prepare_http_tests on Fedora

* Fix deb-src setup for Ubuntu 24.04+

* Set multiarch_test_pkg for Ubuntu 24.04

* Update AZP test matrix
5 months ago
Matt Clay 44f22162cb
Remove timezone support module and tests (#83465)
The timezone support module was used only for changing the timezone in the user module integration tests.

Changing the timezone for the tests is unecessarily complex for the purpose of asserting proper parsing of user expiration times.
5 months ago
Matt Clay f4751766db
selinux compat - add ignore, proper ex chaining (#83460) 5 months ago
Martin Krizek b2a289dcbb
Remove Python 3.10 support for the controller (#83221)
Fixes #83094
5 months ago
Abhijeet Kasurde 6382ea168a
vault: Handle directory value to vault password file (#83384)
When vault password file env variable is set to blank,
this value is converted to CWD and passed for further
processing.
Check if ANSIBLE_VAULT_PASSWORD_FILE is not a directory.

Fixes: #42960

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 months ago
Gilson Guimarães e64c6c1ca5
unarchive: Better handling of files with an invalid timestamp in zip file (#81520)
Fixes: #81092

Signed-off-by: gilsongpfe <gilson.gpf@gmail.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 months ago
Matt Clay 5af5b4b6c8
ansible-test - Update PyPI test container to 3.1.0 (#83432) 5 months ago
Matt Clay 738180d240
ansible-test - Fix unit test coverage collection (#83433) 5 months ago
Jordan Borean a9b902f579
ansible-test action-plugin-docs sidecar (#83325)
Fix to have ansible-test sanity --test action-plugin-docs to check for
action plugin documentation inside a sidecar file rather than a Python
module.
5 months ago
Abhijeet Kasurde 6e8a7ed327
Revert warning message in setup/gather_facts (#83427)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 months ago
Matt Clay cf265eb14d
Add Python 3.13 support (#83416)
* Add Python 3.13 support

* Add temporary work-around for yamllint test
5 months ago
Matt Martz 126ffc7947
Specify -O in windows ssh tests as needed for scp to work with openssh 9+ (#83426) 5 months ago
Matt Clay 14df8c2cf2
ansible-test - Prepare for Python 3.13 (#83414)
Includes an update to `coverage` and pinned Python requirements.
5 months ago
Abhijeet Kasurde d16ad25e4b
Remove extraneous pylint ignore (#83257)
* Pylint issue 511 is closed, remove ignore related to that.

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