Commit Graph

12674 Commits (ba4be21a69d3234bc127bc88f3ebca4ded21e56e)

Author SHA1 Message Date
Matt Clay bf53d4f7c9
[stable-2.18] Replace FreeBSD 13.3 with FreeBSD 13.5 (#85532)
* ansible-test - Replace FreeBSD 13.3 with 13.4 (#84236)

* ansible-test - Replace FreeBSD 13.3 with 13.4
* ansible-test - Fix typos in bootstrap.sh
* Skip libfaketime on FreeBSD except FreeBSD 14

(cherry picked from commit a98801903d)

* ansible-test - Replace FreeBSD 13.4 with 13.5 (#84812)

(cherry picked from commit 4efb01c2f3)

* ansible-test - Use OS packages on FreeBSD 13.5 (#85530)

(cherry picked from commit cdb7af094b)
5 months ago
Brian Coca 5aa2c6326b
ansible-doc display docs for modules w/o ext (#85299) (#85315)
Fixed case in which listing modules for docs failed to get sidecar


(cherry picked from commit 7e495f4b20)

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
6 months ago
Sloane Hertel 0fbbafb581
password lookup - re-attempt acquiring lock file regardless of locale (#85318) (#85349)
* Fix handling FileExistsError, instead of only handling OSError when the human-readable error message is "File exists".


(cherry picked from commit 8e9f5fb9d5)

Co-authored-by: Matt Clay <matt@mystile.com>
6 months ago
Matt Clay 7d3ae41ad9
[stable-2.18] ansible-test - Fix relative import resolution (#85328) (#85445)
(cherry picked from commit 093ac8df2d)
6 months ago
Martin Krizek b860077eff
[stable-2.18] Use f40 official repo for libdnf5 (#85374) 6 months ago
Brian Coca 21a07d1428
[backport 2.18] ansible-pull fix adhoc output inconsistencies on changed (#84869) (#84964)
* ansible-pull fix adhoc output inconsistencies on changed (#84869)

Two fixes for single bug:
  - ignore callback changes for adhoc
  - allow 'yaml' change matching
---------

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 4bc4030988)

* missing test play

* tests for other non backed change

---------

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
7 months ago
Matt Clay 18e63aa7ed
ansible-test - Add RHEL 10.0 remote (#85189) (#85195)
* 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)
7 months ago
Martin Krizek 82655e4565
[stable-2.18] dnf5 - handle all specific libdnf5 exceptions (#85175) (#85228)
Fixes #84634
(cherry picked from commit 99a3346de6)
7 months ago
Martin Krizek e210650d43
[stable-2.18] dnf5 tests: do not remove attr (#85218) (#85220)
On RHEL 10, the attr package is in the dependency tree of dnf itself
and cannot be removed.
(cherry picked from commit a0132fec0b)
7 months ago
Matt Davis cddcdb7f75
add fuzzy matching to package_data sanity (#85103) (#85136)
* add fuzzy matching to package_data sanity

* relaxes exact directory matches for license files to allow setuptools > 72 to pass

* sanity

(cherry picked from commit 7e00053a30)
8 months ago
Felix Fontein 14aed207f9
ansible-doc: fix indent and line wrapping for first line of (sub-)option and (sub-)return value descriptions (#84690) (#84993)
* Fix initial indent for descriptions of suboptions.
* Fix line width for initial line of option descriptions.

(cherry picked from commit 352d8ec33a)
8 months ago
Brian Coca 32979f4a43
ensure predictable permissions on module artifacts (#84948) (#85072)
* ensure predictable permissions on module artifacts (#84948)

and test it!

(cherry picked from commit 9f894b81c2)

* added missing liases
8 months ago
Martin Krizek c45c3b4f49
[stable-2.18] dnf5: avoid generating excessive history entries (#85065) (#85067)
Fixes #85046
(cherry picked from commit cff49a62ec)
8 months ago
Sloane Hertel 1782c7cf6d
Fix old_style_cache_plugins test failure using latest redis (#85090)
Pin last working version instead
8 months ago
Jordan Borean 59e2ddcae0
[stable-2.18] - script fix become on Windows (#85077)
Fixes become when using script on Windows and the become options were
set through host vars or sources that was not set on the task directives
itself.
8 months ago
Matt Clay 9b89ff86a4
[stable-2.18] ansible-test - Use `-t` for container stop timeout (#85019) (#85056)
(cherry picked from commit 0aa8afbaf4)
8 months ago
Brian Coca aa43321d12
Fix uninstall tests (#84973) (#84974)
match file name to package_manager detection of dnf5

(cherry picked from commit 6fc592df9b)
9 months ago
Matt Martz 46b5f36cf7
Revert "[stable-2.18] basic: remember the user sensitive information to use later (#84699) (#84939)" (#84960)
This reverts commit 795970751e.
9 months ago
Abhijeet Kasurde 795970751e
[stable-2.18] basic: remember the user sensitive information to use later (#84699) (#84939)
* Git allows embedding username and password in repo URL for
  https authentication. This may lead to exposing the user sensitive
  information to logs and unautheticated users.
  Adding no_log will partially solve this.
* Added documentation warning user about URL embedded with username
  and password.
* Added logic to remember user sensitive information for later sanitization

Fixes: #84557
(cherry picked from commit 19e9f3d)

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
9 months ago
Brian Coca bd6594e321
needed intesect, not difference (#84839) (#84859)
fixes #84750

Added tests to verify output when using smart + others

(cherry picked from commit 0d4f00f5c8)
9 months ago
Sloane Hertel 9f9991eb10
uri: form location correctly from relative redirect (#84541) (#84854)
* uri: form location correctly from relative redirect

Previously, the original URL would be combined with the relative location incorrectly, especially for URL of any complexity.

Add simple tests demonstrating the problem that fail without the fix

* fix pylint error, import the method similar to other uri methods

* add changelog fragment

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
(cherry picked from commit 61a6222e0e)

Co-authored-by: Robert Muir <rmuir@apache.org>
9 months ago
Abhijeet Kasurde d0b8db8aa0
[bp-2.18] facts: use pagesize for darwin (#84809)
Fixes: #84773

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
(cherry picked from commit 50b4e0d279)
10 months ago
Martin Krizek 9fe08b37d1
[stable-2.18] dnf5: fix is_installed check for provided packages (#84802) (#84810)
Fixes #84578
(cherry picked from commit 7fbaf6c)
10 months ago
Martin Krizek 5307ef6e63
[stable-2.18] dnf tests: unique environment/group name (#84785) (#84786)
Prevents `Group state for \"customenvgroup\" not found` error which may
or may not be a regression in dnf5. Just name groups/envs uniquely to
workaround the issue.
(cherry picked from commit 09391f38f0)
10 months ago
Sloane Hertel 534d5acfcc
linear - don't treat end_role as a run_once task (#84673) (#84710)
(cherry picked from commit a086c34a91)
11 months ago
Martin Krizek b261ebcde1
[stable-2.18] targets/handlers: fix incorrect test cmd (#84567) (#84601)
(cherry picked from commit 3b6d086f5e)
11 months ago
Sloane Hertel 72391efbe3
[2.18] [fix] `warn_if_reserved` expects a list (#84624) (#84671)
* [fix] `warn_if_reserved` expects a list (#84624)

Fixes #84623

(cherry picked from commit 48d71ba3aa)

* changelog

* Test include_vars reserved variable matching (#84678)

* Add test case for include_vars

* Revise test to catch erroneous warnings

(cherry picked from commit 333ee8d010)

---------

Co-authored-by: Dominique Quatravaux <dominique@quatravaux.org>
11 months ago
Matt Clay 7371f780bd
[stable-2.18] ansible-test - Use urllib intead of curl (#84551) (#84629)
Also added automatic retries on HTTP request exceptions, since all currently implemented methods (GET/PUT/DELETE) are idempotent.

(cherry picked from commit 7677bf1c9b)
11 months ago
Jordan Borean ee0084dbcf
Ansible.Basic - Fix required_if check (#84562) (#84582)
Fixes the Ansible.Basic `required_if` check when the option to check is
either unset or explicitly set to null.

(cherry picked from commit 8c5e33cd3a)
12 months ago
Jordan Borean 5f5e5d321b
ssh - Improve CLIXML stderr parsing (#84569) (#84580)
Improves the logic for parsing CLIXML values in the stderr returned by
SSH. This fixes encoding problems by having a fallback in case the
output is not valid UTF-8. It also can now extract embedded CLIXML
sequences in all of stderr rather than just at the start.

(cherry picked from commit f86c58e2d2)
12 months ago
Jordan Borean 0d44d0fde4
ansible-test - fix coverage for test modules (#84366) (#84401)
Fixes the coverage path translation for modules located in integration
test paths. Instead of trying to match by the unique temporary path name
that the module is executed as, the reporting tool will translate it to
the static path that the module is actually located under.

(cherry picked from commit f9b58fa13f)
12 months ago
Brian Coca 420287e83d
fix incongruent ansible-vault cli options (#84494) (#84552)
prompt now only errors if stdin is specifically triggered and not due to lack of other args

fixes #84489
---------

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
(cherry picked from commit a046ef5a95)
12 months ago
Brian Coca 3e22739cc8
fix warnings about reserved variable names to cover all sources (#84432) (#84542)
* fix warnings about reserved variable names to cover all sources (#84432)

Also remove redundant check from tqm
Now covers module output (set_fact/include_vars)
Includes play objects at any stage (tasks that error were not covered)
Added tests, moved them to role structure

(cherry picked from commit 20baf29a2a)

* fix template (#84563)

also fix gather_subset warning and add some comments/notes
---------

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 675d7201d8)

* reserved vars, avoid gather_subset (#84575)

(cherry picked from commit 3398c102b5)
12 months ago
Brian Coca 2ab0976f0e
gather_facts, fix 'smart' handling with network os and 'setup' (#84425) (#84471)
gather_facts, fix network_os and smart logic and defaults

setup will be default for smart only if network_os is not set, now you get warnings and errors when missing a valid facts module for a network os

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit c64c389007)
12 months ago
Brian Coca 91e7f0a8a6
copy, prevent internal options in task (#84422) (#84457)
* copy, prevent internal options in task

fixes #84367

(cherry picked from commit 3c91eab0d8)
12 months ago
Sloane Hertel 53b08f82fc
fix reset_connection with templated connection variables (#84240) (#84439)
Signed-off-by: Alex Willmer <alex@moreati.org.uk>
(cherry picked from commit 59d9737788)

Co-authored-by: Alex Willmer <alex@moreati.org.uk>
12 months ago
Matt Clay 58c5fe2f8a
[stable-2.18] Fix uri integration test on Python 3.13 (#84518) (#84519)
(cherry picked from commit 91f4b71d40)
1 year ago
Matt Clay 88b6e14899
[stable-2.18] Fix result_pickle_error integration test (#84506) (#84507)
The test has been updated to use a custom type which does not support pickling,
instead of relying on Jinja's `Undefined` type. As of Jinja 3.1.5 that type now
supports pickle, which breaks the original implementation of the test.
(cherry picked from commit 5ec236b)
1 year ago
Martin Krizek b88f29ec6d
[stable-2.18] dnf5: fix is_installed check (#84275) (#84333)
* dnf5: fix is_installed check (#84275)

Fixes #84259

(cherry picked from commit a27a7a27d1)

* dnf5 - consolidate package resolving settings (#84335)

Fixes #84334

(cherry picked from commit c99493eb3f)
1 year ago
Sloane Hertel 84b407cbdb
Fix returning unreachable for looped tasks (#84049) (#84204)
* Fix returning unreachable for looped tasks

Add tests for ignore_unreachable and loop

(cherry picked from commit 03acb22f99)
1 year ago
Jordan Borean 2936b80dbb
Fix CVE-2024-11079 hostvars unsafe context (#84339)
Fix to preserve an unsafe variable when accessing through an
intermediary variable from hostvars.
1 year ago
Matt Clay 1f88f0984f
[stable-2.18] ansible-test - Improve container network detection (#84323) (#84338)
When detection of the current container network fails, a warning is now issued and execution continues.
This simplifies usage in cases where the current container cannot be inspected, such as when running in GitHub Codespaces.

(cherry picked from commit 95e3af3e0f)
1 year ago
Matt Clay 3766ea2a8c
[stable-2.18] ansible-test - Fix interactive cmd traceback (#84264) (#84265)
(cherry picked from commit 68bfa37838)
1 year ago
Matt Davis 23f8639a4b
[stable-2.18] Preserve `_ansible_no_log` from action result; fix `include_vars` to set properly (#84143) (#84179)
* 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 year ago
Brian Coca 3b6de811ab
user module avoid conflicts ssh pub key (#84165) (#84171)
Remove pub key if we are going to generate private
fix tests for os X

(cherry picked from commit 11e4a6a722)
1 year ago
Sviatoslav Sydorenko (Святослав Сидоренко) cfdafb9bb6
[2.18] Trim `selinux_policytype` @ integration tests (#84137)
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 year ago
Abhijeet Kasurde a3656b2ffb
[stable-2.18] facts: Skip path if the distribution path is directory (#84036)
Skip path if the distribution path is directory instead of file.
Handle exception raised while handling distribution path.

Fixes: #84006

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 34f8f55d9e)
1 year ago
Abhijeet Kasurde 6e4732f8cd
[stable-2.18] debconf: set empty password value (#84033)
Fixes: #83214

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 79e8c4c26c)
1 year ago
Brian Coca c068e45d8d
user module, avoid chmoding symlink'd home file (#83956) (#84080)
also added tests

---------
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>

(cherry picked from commit 0959472bc6)
1 year ago
Sloane Hertel d0f794d1f6
ansible-galaxy - fix ignoring certs when installing from git repos (#83332) (#84070)
* Fix installing collections|roles from git repos with GALAXY_IGNORE_CERTS

* Fix installing collections from git repos with --ignore-certs

* Update unit test

* Add test case

(cherry picked from commit d0df3a174a)
1 year ago