Commit Graph

54533 Commits (3e36cc3967adb45a7ea7f44449db9effd19d822c)
 

Author SHA1 Message Date
Matt Martz d84412e5ff
New release v2.17.10rc1 (#84841) 9 months ago
Jordan Borean 5575090626
Windows - Support WDAC Audit Mode (#84730) (#84733)
Fix up bug when attempting to run any module on a Windows host that has
been configured with WDAC and Dynamic Code Security in audit mode. This
does not enable WDAC support with signed scripts so Ansible will still
not pass the audit events but it no longer fails to run.

(cherry picked from commit e5ec1ee76c)
9 months ago
Matt Clay 7feef595cb
Update Ansible release version to v2.17.9.post0. (#84748) 10 months ago
Matt Clay 3397319396
New release v2.17.9 (#84746) 10 months ago
Matt Martz a47327006a
Update Ansible release version to v2.17.9rc1.post0. (#84723) 10 months ago
Matt Martz f0d7f96fee
New release v2.17.9rc1 (#84721) 10 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)
10 months ago
Matt Clay abc21f52dd
[stable-2.17] Use separate venvs for each release command (#84641) (#84648)
This avoids requirements conflicts between different commands invoked by the release tool.

(cherry picked from commit 4cc47307ef)
10 months ago
Matt Clay c8df9e3675
[stable-2.17] release.py - Use changelog requirements (#83920) (#84645)
Use the changelog sanity test requirements instead of the package-data sanity test requirements.

This enables removal of most package-data sanity test requirements, as they are no longer used by the test itself.
The additional requirements were being maintained only to provide pinned requirements for building the changelog during a release.

(cherry picked from commit cd342f76b4)
10 months ago
Matt Martz bc1fd0f93d
Update Ansible release version to v2.17.8.post0. (#84616) 11 months ago
Matt Martz 3c3f153595
New release v2.17.8 (#84614) 11 months ago
Matt Martz 3983521096
Update Ansible release version to v2.17.8rc1.post0. (#84585) 11 months ago
Matt Martz 04aef846e8
New release v2.17.8rc1 (#84584) 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 496c4982e6
Make sure we are always using Lock from our multiprocessing context (#84453) (#84463)
* Make sure we are always using Lock from our multiprocessing context

* add clog frag

(cherry picked from commit 73d8f4ad46)

Co-authored-by: Matt Martz <matt@sivel.net>
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 2df74c579f
Added None/empty notes to regex_search (#84437) (#84458)
(cherry picked from commit 3fffddc183)
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)
11 months ago
Matt Martz bd535f564f
Update Ansible release version to v2.17.7.post0. (#84417) 1 year ago
Matt Martz dc0e3bd16c
New release v2.17.7 (#84414) 1 year ago
Matt Martz b4797ab7e5
Update Ansible release version to v2.17.7rc1.post0. (#84392) 1 year ago
Matt Martz a8c8f1d82b
New release v2.17.7rc1 (#84389) 1 year ago
Brian Coca 8f85ef2c72
command module, fix docs to reflect reality (#84191) (#84278)
though the previous docs were the 'intended' outcome,
the current behaviour has been active for a long time and should
not be removed due to backward compatibility issues.

One thing we can do going forward is deprecate substitution enabled by default.

(cherry picked from commit bf48b538f8)
1 year ago
Brian Coca 708b996def
vars/varnames more examles more varied (#84300) (#84305)
also ref each other in seealso as they will commonly be used toghether

(cherry picked from commit c734ac2125)
1 year 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
Abhijeet Kasurde 1c86e75227
Remove selinux import (#83674) (#84317)
Remove selinux import which was kept for backward compatibility

Fixes: #83657

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit d23a2de5f2)
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
Matt Martz a87112f137
Update Ansible release version to v2.17.6.post0. (#84257) 1 year ago
Matt Martz 05e01efa85
New release v2.17.6 (#84250) 1 year ago
Matt Clay f9929de976
Update Ansible release version to v2.17.6rc1.post0. (#84199) 1 year ago
Matt Clay f35d268874
New release v2.17.6rc1 (#84194) 1 year ago
Sloane Hertel d6b5fb6ac8
Fix error message given by ansible.module_utils.facts.timeout.timeout (#83945) (#84069)
(cherry picked from commit ee9e6130a7)
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
Abhijeet Kasurde 4fbcdfda4e
[stable-2.17] Update unique filter docs (#84083)
* Correct case_sensitive example
* Add attribute docs

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 18c6b40e19)

Co-authored-by: Tinyblargon <76069640+Tinyblargon@users.noreply.github.com>
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