Commit Graph

54670 Commits (507cf4beb4bfabc9238a63a9d7c20404878a3d9c)
 

Author SHA1 Message Date
Felix Fontein 507cf4beb4
Extend description for meta refresh_inventory (#84691) (#84706)
* Link to amazon.aws.aws_ec2 inventory plugin.

* Mention that refresh_inventory does not update the selected hosts for a play.

* Address comments by bcoca.

* Apply suggestions from code review

---------

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit ea2fe793aa)
10 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>
10 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)
10 months ago
Matt Clay 326fbcdcb3
[stable-2.18] Use separate venvs for each release command (#84641) (#84643)
This avoids requirements conflicts between different commands invoked by the release tool.

(cherry picked from commit 4cc47307ef)
10 months ago
Matt Martz 307f2fd93f
Update Ansible release version to v2.18.2.post0. (#84617) 11 months ago
Matt Martz 7c5e00274b
New release v2.18.2 (#84615) 11 months ago
Matt Martz b4dfc6a660
Update Ansible release version to v2.18.2rc1.post0. (#84586) 11 months ago
Matt Martz 95bf4dd427
New release v2.18.2rc1 (#84583) 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)
11 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)
11 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)
11 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)
11 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)
11 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)
11 months ago
Sloane Hertel 2870532035
Make sure we are always using Lock from our multiprocessing context (#84453) (#84462)
* 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
Brian Coca 6cfec0f44a
Added None/empty notes to regex_search (#84437) (#84460)
(cherry picked from commit 3fffddc183)
11 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)
11 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>
11 months ago
Matt Clay 58c5fe2f8a
[stable-2.18] Fix uri integration test on Python 3.13 (#84518) (#84519)
(cherry picked from commit 91f4b71d40)
11 months 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)
11 months ago
Matt Martz 48d7fd7456
Update Ansible release version to v2.18.1.post0. (#84418) 1 year ago
Matt Martz 3223e442ab
New release v2.18.1 (#84415) 1 year ago
Matt Martz 2248754de5
Update Ansible release version to v2.18.1rc1.post0. (#84393) 1 year ago
Matt Martz ced97d5a0b
New release v2.18.1rc1 (#84390) 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
Brian Coca 8f2cc9d916
vars/varnames more examles more varied (#84300) (#84304)
also ref each other in seealso as they will commonly be used toghether

(cherry picked from commit c734ac2125)
1 year ago
Jordan Borean fec17efe26
Fix runas become SYSTEM logic (#84280) (#84297)
Fixes the logic when attempting to become the SYSTEM user using the
runas plugin. It was incorrectly assumed that calling LogonUser with the
SYSTEM username would produce a new token with all the privileges but
instead it creates a copy of the existing token. This reverts the logic
back to the original process and adds in new logic to avoid any tokens
that are restricted from creating new processes.

(cherry picked from commit 3befdd3d15)
1 year ago
Brian Coca 0fb9772a7b
command module, fix docs to reflect reality (#84191) (#84277)
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
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 Martz 393c80256d
Update Ansible release version to v2.18.0.post0. (#84258) 1 year ago
Matt Martz ec78526b97
New release v2.18.0 (#84251) 1 year ago
Matt Clay b1366ce965
Update Ansible release version to v2.18.0rc2.post0. (#84198) 1 year ago
Matt Clay 00031d2d6f
New release v2.18.0rc2 (#84193) 1 year ago
Matt Davis 93c3133c2d
remove stale changelog entry (#84187)
* forward-port of a fix that was already included in 2.17.0 and backported to all supported stable branches
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
Matt Martz eaec3748c5
Update Ansible release version to v2.18.0rc1.post0. (#84124) 1 year ago
Matt Martz 34ccdfa90a
New release v2.18.0rc1 (#84122) 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
Abhijeet Kasurde d9d010441f
[stable-2.18] Update unique filter docs (#84082)
* 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
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
Sloane Hertel c17149c4db
Fix error message given by ansible.module_utils.facts.timeout.timeout (#83945) (#84068)
* Update unit test

Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
(cherry picked from commit ee9e6130a7)
1 year ago
Martin Krizek 371564cdc6
Reduce number of implicit meta tasks (#84007) (#84044)
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
Matt Clay d10cca984e
[stable-2.18] ansible-test - Improve container probe error handling (#84109) (#84110)
(cherry picked from commit 48be6f8b6f)
1 year ago