Commit Graph

12513 Commits (97b18282c72d7752c20a3cc65e5cadfa9eda031d)

Author SHA1 Message Date
Matt Clay 5ad66656c3
Replace FreeBSD 13.3 with FreeBSD 13.5 (#85534)
* 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 c3d8d790e7
ansible-doc display docs for modules w/o ext (#85299) (#85316)
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
Matt Clay 6c0d8250c9
[stable-2.17] ansible-test - Fix relative import resolution (#85328) (#85446)
(cherry picked from commit 093ac8df2d)
6 months ago
Martin Krizek 5c82305be9
[stable-2.17] Use f39 official repo for libdnf5 (#85286)
The nightly repo is no longer available.
7 months ago
Matt Clay 7543d309b0
[stable-2.17] ansible-test - Add RHEL 10.0 remote (#85189) (#85267)
* 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)

* Remove unsupported sub_key tests

* Add RHEL 10 support to dnf test
7 months ago
Martin Krizek f0beb39639
[stable-2.17] dnf5 tests: do not remove attr (#85218) (#85271)
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 58e7d475dc
add fuzzy matching to package_data sanity (#85103) (#85135)
* 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 a2225f78f8
ansible-doc: fix indent and line wrapping for first line of (sub-)option and (sub-)return value descriptions (#84690) (#84994)
* 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 19d35721c3
ensure predictable permissions on module artifacts (#84948) (#85073)
* ensure predictable permissions on module artifacts (#84948)

and test it!

(cherry picked from commit 9f894b81c2)

* missing aliases
8 months ago
Jordan Borean bc955df46c
[stable-2.18] - script fix become on Windows (#85077) (#85078)
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.

(cherry picked from commit 59e2ddcae0)
8 months ago
Sloane Hertel 1cad5dc47a
Fix old_style_cache_plugins test failure using latest redis (#85091)
Pin last working version instead
8 months ago
Matt Clay 7c6147ed78
[stable-2.17] ansible-test - Use `-t` for container stop timeout (#85019) (#85057)
(cherry picked from commit 0aa8afbaf4)
8 months ago
Matt Clay 3546111f2d
[stable-2.17] ansible-test - Replace FreeBSD 14.0 with 14.1 (#85028)
(cherry picked from commit a121a169e3)
8 months ago
Brian Coca 8fc86acc87
Fix uninstall tests (#84973) (#84975)
match file name to package_manager detection of dnf5

(cherry picked from commit 6fc592df9b)
8 months ago
Matt Martz 1b01f1af94
Revert "[stable-2.17] basic: remember the user sensitive information to use later (#84699) (#84940)" (#84961)
This reverts commit 8bc0cab838.
9 months ago
Abhijeet Kasurde 8bc0cab838
[stable-2.17] basic: remember the user sensitive information to use later (#84699) (#84940)
* 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 73189a7a8d
needed intesect, not difference (#84839) (#84860)
fixes #84750

Added tests to verify output when using smart + others

(cherry picked from commit 0d4f00f5c8)
9 months ago
Martin Krizek 7153b98a64
[stable-2.17] targets/handlers: fix incorrect test cmd (#84567) (#84602)
(cherry picked from commit 3b6d086f5e)
10 months ago
Sloane Hertel 46f5030fa3
[2.17] [fix] `warn_if_reserved` expects a list (#84624) (#84672)
* [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>
10 months ago
Matt Clay c71a404b97
[stable-2.17] ansible-test - Use urllib intead of curl (#84551) (#84630)
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 3ce869824e
Ansible.Basic - Fix required_if check (#84562) (#84581)
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)
11 months ago
Brian Coca a9550b835e
fix incongruent ansible-vault cli options (#84494) (#84553)
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)
11 months ago
Brian Coca d4b311dbaa
gather_facts, fix 'smart' handling with network os and 'setup' (#84425) (#84472)
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)
11 months ago
Brian Coca dfff9c3f25
copy, prevent internal options in task (#84422) (#84459)
* copy, prevent internal options in task

fixes #84367

(cherry picked from commit 3c91eab0d8)
11 months ago
Jordan Borean 423edf73bd
ansible-test - fix coverage for test modules (#84366) (#84400)
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)
11 months ago
Sloane Hertel 98e9daa000
fix reset_connection with templated connection variables (#84240) (#84440)
* ssh: Test reset_connection with templated ansible_ssh_executable

Add failing test to confirm subsequent fixes are necessary & sufficient.

* ssh: Fix reset_connection with templated ansible_ssh_executable

Signed-off-by: Alex Willmer <alex@moreati.org.uk>
(cherry picked from commit 59d9737788)

Co-authored-by: Alex Willmer <alex@moreati.org.uk>
11 months ago
Brian Coca 819e437d96
fix warnings about reserved variable names to cover all sources (#84432) (#84543)
* 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)
11 months ago
Matt Clay e96369cf7e
[stable-2.17] Fix result_pickle_error integration test (#84506) (#84508)
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)
12 months ago
Sloane Hertel ee55ffa5e0
Fix returning unreachable for looped tasks (#84049) (#84205)
* Fix returning unreachable for looped tasks

Add tests for ignore_unreachable and loop

(cherry picked from commit 03acb22f99)
1 year ago
Martin Krizek 8961fb1bf2
[stable-2.17] dnf5: fix is_installed check (#84275) (#84363)
* 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)

* New change as create_repo has been rewritten in 2.18
1 year ago
Jordan Borean 98774d15d7
Fix CVE-2024-11079 hostvars unsafe context (#84339) (#84354)
Fix to preserve an unsafe variable when accessing through an
intermediary variable from hostvars.

(cherry picked from commit 2936b80dbb)
1 year ago
Matt Clay d0c9fc3edd
[stable-2.17] ansible-test - Fix interactive cmd traceback (#84264) (#84266)
(cherry picked from commit 68bfa37838)
1 year ago
Sloane Hertel 9adf0c9ff6
ansible-galaxy - fix ignoring certs when installing from git repos (#83332) (#84071)
* 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
Matt Davis 4a65443547
[stable-2.17] Preserve `_ansible_no_log` from action result; fix `include_vars` to set properly (#84143) (#84180)
* 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
Martin Krizek d449c7b0bb
Reduce number of implicit meta tasks (#84007) (#84045)
This greatly reduces run time on large inventories since meta tasks are
executed in the main process sequentially and just executing them is expensive.

This change avoids running the following implicit meta tasks:
  * ``flush_handlers`` on hosts where no handlers are notified
  * ``noop`` for the linear strategy's lockstep, instead hosts that are
    not executing the current task are just not part of the current host loop

A playbook consiting of two simple plays both running on ~6000 hosts
runs in:
devel: 37s
this PR: 1.3s

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
(cherry picked from commit d6d2251929)
1 year ago
Abhijeet Kasurde 91ca09beb0
[stable-2.17] facts: Skip path if the distribution path is directory (#84037)
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 92ee1fa499
[stable-2.17] debconf: set empty password value (#84034)
Fixes: #83214

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 79e8c4c26c)
1 year ago
Brian Coca f7be90626d
[stable-2.17] user action, fix ssh-keygen issues (#84170)
* 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)

* Restore test import missing from backport

---------

Co-authored-by: Matt Clay <matt@mystile.com>
1 year ago
Brian Coca 3b5a431998
user module, avoid chmoding symlink'd home file (#83956) (#84081)
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
Sviatoslav Sydorenko (Святослав Сидоренко) 45f486586e
[2.17] Trim `selinux_policytype` @ integration tests (#84138)
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
Matt Clay b3a6e66edd
[stable-2.17] ansible-test - Improve container probe error handling (#84109) (#84111)
(cherry picked from commit 48be6f8b6f)
1 year ago
Matt Clay f3579e469c
[stable-2.17] ansible-test - Work around pylint issue on 3.11 (#84094) (#84097)
(cherry picked from commit 62ce21b6e4)
1 year ago
Brian Coca 589a3aa198
copy, fix permissions and atime on diff partitions (#83824) (#83859)
we just set time also, when on diff partitions

(cherry picked from commit 2a676ff897)
1 year ago
Brian Coca 30651ecc26
delay keyword changed from int to float (#83901) (#83912)
* delay keyword changed from int to float

(cherry picked from commit 9c49fdd86d)
1 year ago
Brian Coca b9dfd1f77a
fix copy module update atime/mtime (#83235) (#83792)
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>
(cherry picked from commit 26375e7f12)

Co-authored-by: dkuji <daisuke.kuji@gmail.com>
1 year ago
Matt Martz 5f0e551a8d
[stable-2.17] Prevent condor from being installed and fulfilling libfmt dependency (#84023) (#84025)
(cherry picked from commit fb7fd51)
1 year ago
Brian Coca f0badf8970
Ansible Errors, Don't hide stacked messages when yaml (#83933) (#83999)
Also remove redundant msg now that we fixed yaml case
So no more need to %s % e.

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 0c8efa29b2)
1 year ago
Martin Krizek 08d32bc3a2
dnf5: re-introduce ``state: installed`` alias (#83961) (#83976)
Fixes #83960

(cherry picked from commit aa24e97435)
1 year ago
Felix Fontein 803cbccbc3
runtime-metadata sanity test: do not fail deprecation version checks if galaxy.yml has empty `version` (#83831) (#83856)
* Do not create invalid SemanticVersion objects.
* Fix SemanticVersion.parse().
* Add basic runtime-metadata tests.

(cherry picked from commit faf446a895)
1 year ago
Jordan Borean 0200ccb586
Add location on include_tasks fail inside include (#83876) (#83883)
Adds the datastore details to the parser error when attempting to
include tasks that contain include_tasks without a filename set. This
change will now display the exact location of the include_tasks that
failed like any normal syntax error.

(cherry picked from commit 1503805b70)
1 year ago