Commit Graph

54967 Commits (744f86fbc5cf1c0cdfaac66f05fb5fbec72bd7fc)
 

Author SHA1 Message Date
Martin Krizek 744f86fbc5 Deprecate module_utils.common.collections.count (#85233)
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit 487d699226)
6 months ago
Jordan Borean 698b8d64fc Exclude ansible._protomatter from ansible-doc output by default (#85115)
* Exclude ansible._protomatter from ansible-doc output by default

* Added changelog

(cherry picked from commit b4741fc495)
6 months ago
Matt Davis 7b99b0144d local connection always passes str to Popen (#85239)
(cherry picked from commit 0ee1c36779)
6 months ago
Matt Davis d63f9aa38d Misc ssh agent fixes (#85238)
* Misc ssh-agent fixes

* Replace manual SIGALRM handling with new alarm_timeout context manager
* Misc error handling fixes to ssh-agent startup
* Add SSH_AGENT_EXECUTABLE config to ease failure mode testing
* 100% test coverage on agent startup failure code

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

* make SSH Agent support internal

---------

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit 2a24633964)
6 months ago
Matt Clay 0576ff3e65 Add missing warning methods and args (#85225)
(cherry picked from commit eafe5fc739)
6 months ago
Matt Davis 85283e7238 Clean up TE error handling, wrap sigalrm handler (#85232)
* Clean up TE error handling, wrap sigalrm handler

* Preserve error detail on AnsibleAction and Connection exceptions.
* Remove multiple layers of unreachable or redundant error handling.
* Wrap manual alarm signal/timeout handling into a context manager, add tests.

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

* update error message check in test

* update test timeout message assertions

---------

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit cbcefc53a3)
6 months ago
Brian Coca 311ef75245 async handling changed to use 'true' booleans(#85074)
async_status and async_wrrapper now use booleans instead of 0/1 for 'thruthyness'
gather_facts also updated

Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit d41a3430b7)
6 months ago
Martin Krizek 0d01da2dc2 jinja2.__version__ is deprecated (#85221)
Prepare for its removal in Jinja 3.3.

See https://github.com/pallets/jinja/pull/2098

(cherry picked from commit 0e2f770a24)
6 months ago
Matt Davis 5fd78b07fb Added _TEMPLAR_SANDBOX_MODE config (#85222)
* Added _TEMPLAR_SANDBOX_MODE config

* allows unsafe attribute checks to be disabled in Jinja sandbox

* Update lib/ansible/_internal/_templating/_jinja_bits.py

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

---------

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit 91453e30af)
6 months ago
Matt Clay 8b0b54de38 ansible-test - Fix incorrect use of InferenceContext (#85230)
(cherry picked from commit e2a5377b9a)
6 months ago
Matt Davis 21f478e77b Decouple SSH client verbosity from Ansible display (#85224)
* decouple SSH client verbosity from Ansible display

* remove failing false-coverage unit test

(cherry picked from commit b71d9aa4a5)
6 months ago
Matt Davis 40a675543f fix from_yaml_all filter inconsistent None handling (#85223)
* fix from_yaml_all filter inconsistent None handling

* always returns empty list for None or empty string input

* deprecate non-string inputs for from_yaml and from_yaml_all

(cherry picked from commit 356bf336bd)
6 months ago
Harshvardhan Sharma fa2f1e4750 Improve SUSE distribution detection using VARIANT_ID with fallback (#85152)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit f05b1d1ccf)
6 months ago
Martin Krizek 2adc8ae1cd dnf5 - handle all specific libdnf5 exceptions (#85175)
Fixes #84634

(cherry picked from commit 99a3346de6)
6 months ago
Martin Krizek 6f7215ca36 dnf5 tests: do not remove attr (#85218)
On RHEL 10, the attr package is in the dependency tree of dnf itself
and cannot be removed.

(cherry picked from commit a0132fec0b)
6 months ago
Kimmo Suominen 43b0155529 Recognize virtualization type correctly on Linode (#85184)
(cherry picked from commit 3b66150cc3)
6 months ago
Abhijeet Kasurde 2d800e1a4c service: Remove py2 specific code (#85191)
Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
(cherry picked from commit 068157618c)
6 months ago
Martin Krizek df60504b93 apt_repository: remove Python 2 support (#85212)
(cherry picked from commit f635a22d81)
6 months ago
Jordan Borean abb1de2780 win coverage - Fix untrusted coverage collection (#85197)
Fixes the logic when running a module through App Control when the
module is not trusted to run in Full Language Mode. This ensures
coverage will still run as expected and that the trust verification only
happens in the wrappers that actually run/prepare the code.

Also expands on a comment to clarify why only that branch is set to set
the internal file encoding to UTF-8.

(cherry picked from commit 17cee7a982)
6 months ago
Matt Clay 457b40d659 Include message in captured tracebacks (#85196)
This matches the formatting of tracebacks from exceptions.

(cherry picked from commit 359173c006)
6 months ago
Matt Clay 3207e55ca2 display - Replace CRNL with NL (#85194)
(cherry picked from commit e226294855)
6 months ago
Matt Clay 424327c293 ansible-test - Add RHEL 10.0 remote (#85189)
* ansible-test - Add RHEL 10.0 remote

* Update tests for RHEL 10
* Fix iptables test
* Rework rpm_key integration test

(cherry picked from commit 53b0f1645b)
6 months ago
Martin Krizek cc0ef95ce8 csvfile lookup: remove Python 2 compat (#85186)
(cherry picked from commit c6a2e5ea75)
6 months ago
Matt Clay 8bbc43efd0 Limit SSH agent DSA testing to RHEL 9 (#85193)
(cherry picked from commit 6a1c24ca99)
6 months ago
Jordan Borean 880b584124 Add support for Windows App Control/WDAC (#84898)
* Add support for Windows App Control/WDAC

Adds preview support for Windows App Control, formerly known as WDAC.
This is a tech preview feature and is designed to test out improvements
needed in future versions of Ansible.

* Use psd1 and parse it through the Ast to avoid any unexpected execution results

* Add tests for various manifest permutations

* Ignore test shebang failure

* Apply suggestions from code review

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>

* Use more flexible test expectations

* Add type annotations for shell functions

---------

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
(cherry picked from commit 75f7b2267d)
6 months ago
Matt Clay 895af10b99 ansible-test - Improve deprecated checking type inference (#85159)
* ansible-test - Improve deprecated checking type inference

Also disabled the ``bad-super-call`` pylint rule due to false positives.

* Add type comment support

* Try without using register_transform

(cherry picked from commit e82be177cd)
6 months ago
Matt Clay 638d711a72 ansible-test - Fix option filtering (#85182)
(cherry picked from commit feda0a5c6e)
6 months ago
Matt Clay 1441817ffe Remove unnecessary module shebang (#85183)
(cherry picked from commit 1e64707592)
6 months ago
Matt Clay 01e97d7f80 DTFIX recategorization and error/warning refactor (#85181)
Co-authored-by: Matt Davis <nitzmahone@redhat.com>
(cherry picked from commit 242bb9ebab)
6 months ago
Martin Krizek 108f349e1d Integration tests clean up (#85130)
* Integration tests clean up

* more

* we only test with Ubuntu 24.04 on the controller

(cherry picked from commit 40c919d7bd)
6 months ago
Matt Clay 35a951b611 Expand scope of `black` sanity test (#85169)
(cherry picked from commit 97dd5f104c)
6 months ago
Matt Clay 76fa45895d Code formatting for .azure-pipelines/ (#85166)
(cherry picked from commit 14bf64ddf8)
6 months ago
Lee Garrett 1381fc30a3 Mark integration tests as needs/root (#84487)
For calling setup_test_user, which adds a user to the system (and thus requiring
root):
- become
- become_su
- become_sudo
- slurp

And also:
- apt, which installs/removes system packages
- deb822_repository, which adds/removes apt repos
- hardware_facts calls losetup, which requires root
- package_facts, which installs/removes system packages

Co-authored-by: Lee Garrett <lgarrett@rocketjump.eu>
(cherry picked from commit ebd022ee42)
6 months ago
Matt Clay f771784853 Code formatting for packaging/cli-doc/ (#85167)
(cherry picked from commit 930ffd1a83)
6 months ago
Matt Clay 46cc5d6b90 Code formatting for packaging/release.py (#85168)
(cherry picked from commit ed0e78fd9c)
6 months ago
Matt Clay 0ba6145aa8 Code formatting for test/sanity/code-smell/ (#85165)
(cherry picked from commit 460343510c)
6 months ago
Jordan Borean 1bd8ed4437 Fix constructable inventory default keyed group (#85002)
Fix the logic for a constructable inventory `keyed_groups` entry to use
the `default_value` if the ``key` expression result is `None` or `omit`
and not just an empty string. This bug was introduced with the changes
in data tagging and goes back to the original behaviour.

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
(cherry picked from commit fe2d9e316a)
6 months ago
Matt Clay 33c3844daa ansible-test - Update default containers (#85161)
(cherry picked from commit 7ac74ab591)
7 months ago
Matt Clay b6fad7bbb8 ansible-test - Update sanity requirements (#85160)
(cherry picked from commit 588410fe50)
7 months ago
Matt Davis 3a2248a992 recategorize pass over DTFIX-MERGE entries post b4 (#85155)
(cherry picked from commit f5a85493c1)
7 months ago
Matt Clay 134c8ec093 Add missing cache plugin test scenarios (#85154)
(cherry picked from commit 567fda6906)
7 months ago
Matt Davis fddda73042 ensure builtin tests always return bool (#85149)
* added unit test validation and coverage enforcement

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit e5476972da)
7 months ago
Matt Davis 60ddb2954b misc changelog and docstring cleanup (#85148)
* deferred listify_lookup_plugin_terms deprecation

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit 7be1359841)
7 months ago
Matt Clay b2699fade5 release.py - Remove email announcement support (#85060)
Also add missing git and run overloads.

(cherry picked from commit 93aa611435)
7 months ago
Matt Clay 5e0733288e
Update Ansible release version to v2.19.0b4.post0. (#85137) 7 months ago
Matt Clay 731b4d0242
New release v2.19.0b4 (#85133) 7 months ago
Matt Davis d6a8582da7 fix ensure_type to support vaulted values (#85129)
* restored parity with 2.18

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit 9a426fe303)
7 months ago
Matt Davis 204cdcee67 ensure that all config return values are Origin-tagged (#85127)
Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit fc8a227647)
7 months ago
Matt Davis df214f93a7 apply trust to declarative plugin config (#85126)
* trust strings in loaded doc fragments
* added tests
* added hard_fail_context test mechanism

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit 9efba4f972)
7 months ago
Lorenzo Tanganelli 27aca0abd3 facts: CloudStack KVM Hypervisor to Linux virtual fact (#85117)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 8a4fb78988)
7 months ago