Commit Graph

54123 Commits (4576f33ac5b9753ceac6b6e59f4dea231d42203c)
 

Author SHA1 Message Date
Matt Clay b65a6cd1b2
[stable-2.16] ansible-test - Add work-around for pytest>=8 errors (#82723) (#82727)
* ansible-test - Add work-around for pytest>=8 errors
* Update changelogs/fragments/ansible-test-pytest-8.yml

(cherry picked from commit a1edb61ce7)
9 months ago
Matt Martz 4a92114686
Update Ansible release version to v2.16.4.post0. (#82751) 9 months ago
Matt Martz 9f6649cadc
New release v2.16.4 (#82746) 9 months ago
Matt Martz 6ad778c6b5
[stable-2.16] Disable ansible-test podman container tests on Ubuntu 22.04 (#82748) (#82750)
(cherry picked from commit 9a8be1e)
9 months ago
Matt Martz f41469fe0c
Update Ansible release version to v2.16.4rc1.post0. (#82710) 9 months ago
Matt Martz 8c4aa28696
New release v2.16.4rc1 (#82709) 9 months ago
Mark Goddard 23d055e835
Fix issues with ansible-playbook-callbacks test (#82407) (#82630)
The timing of the async tasks was a little unpredictable, meaning that
sometimes we would get an unexpected number of v2_runner_on_async_poll
callbacks, and fail the test. This change fixes the issue by increasing
the poll interval to 2 seconds and the sleep duration to 3 seconds, such
that on a reasonably responsive system we will poll twice per task, with
the sleep ending in the middle of the two polls.

The include_me.yml file does not exist in this integration test. It has
been added.

The remote_tmp_dir.path expression is invalid - the setup_remote_tmp_dir
role uses set_fact to set remote_tmp_dir to remote_tmp_dir.path.

The integration tests run with ANSIBLE_HOST_PATTERN_MISMATCH=error,
meaning that the final play was never reached. Set
ANSIBLE_HOST_PATTERN_MISMATCH=warning to continue past the play and
trigger the v2_playbook_on_no_hosts_matched callback.

(cherry picked from commit 4a2de764ec)
10 months ago
Sloane Hertel 74f99dc36c
Fix ansible.builtin.include_vars - depth (#80995) (#82610)
* Changes as suggested by sivel

* Add changelog fragment and tests

Co-authored-by: Matt Martz <matt@sivel.net>
Co-authored-by: s-hertel <19572925+s-hertel@users.noreply.github.com>
(cherry picked from commit 48bed1e15a)

Co-authored-by: tachyontec <92679798+tachyontec@users.noreply.github.com>
10 months ago
Martin Krizek c93234304b
Do not ignore SyntaxError from jinja2.Environment.from_string (#82607) (#82614)
Jinja may generate an invalid Python source code from a template. Trying
to compile such source code into a Python code object results in
SyntaxError being thrown. An example of such a template is providing the
same keyword argument into a lookup twice, resulting in:
`SyntaxError: keyword argument repeated`.

Since `jinja2.exceptions.TemplateSyntaxError` does not cover such a
case, as it is not a Jinja parsing error, we need to catch SyntaxError
explicitly ourselves.

Fixes #82606

(cherry picked from commit 6d34eb88d9)
10 months ago
Sloane Hertel add76f36f5
fix loading vars_plugins in roles (#82273) (#82609)
* Fix loading legacy vars plugins when the plugin loader cache is reset

* Remove extra cache layer by ensuring vars plugin names are cached (stateless or not) so that the plugin loader cache can double as the load order

(cherry picked from commit 13e6d8487a)
10 months ago
Sloane Hertel 9a07ab72b4
[2.16] expect - fix argument spec error with timeout=null (#82522) (#82608)
* expect - fix argument spec error with timeout=null (#82522)

* Fix using timeout=null to wait indefinitely

* fix error message

(cherry picked from commit da9edd7760)

* python2-ify
10 months ago
Maxwell G 3e3c29b86e
changelog: use correct spelling for possessive pronoun its (#82594) 10 months ago
Matt Martz 10211fcf02
Update Ansible release version to v2.16.3.post0. (#82622) 10 months ago
Matt Martz df6c5244ef
New release v2.16.3 (#82619) 10 months ago
Matt Martz 5bef147a5d
Update Ansible release version to v2.16.3rc1.post0. (#82591) 10 months ago
Matt Martz 19e82eca02
New release v2.16.3rc1 (#82587) 10 months ago
Nilashish Chakraborty d817f5e87f
Support `action_plugin` in plugin_routing_schema (#82562) (#82581)
now validation schema matches reality

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
Co-authored-by: s-hertel <19572925+s-hertel@users.noreply.github.com>
(cherry picked from commit b01f1f207c)
10 months ago
Brian Coca 611d0e4dcf Better errors for delegate_to (#82319)
Handle empty result of templating
  Also skip work when we omit

(cherry picked from commit 6ebefaceb6)
10 months ago
Brian Coca 50736c45ba lookups, make file searching use better is_role (#82290)
* lookups, make file searching use better is_role

 The dwim function will internally try by detecting tasks/main['','.yml','.yaml]
 but this is far from optimial, the existince of role path in vars is much better
 indicator that we can use to pass a hint

* updated test to avoid main.yml

(cherry picked from commit a9919dd7f6)
10 months ago
snipfoo c3b4b3ebe3 Run all handlers with the same `listen` topic when notified from another handler (#82364)
Fixes #82363

(cherry picked from commit 8328153121)
10 months ago
Brian Coca cfa8caff39
[stable-2.16] Role fixes (#82339) (#82452)
* Role fixes (#82339)

* Various fixes to roles

  - static property is now properly set
  - role_names and other magic vars now have full list
  - role public/private var loading is now done when adding to play.roles instead of on each var query
  - added tests

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 55065c0042)

* import_role does not get public until next version
10 months ago
Brian Coca 46d9d4b17c ansible-config dedupe ini plugin entries (#82498)
added test for ini file integrity, also ensuring no dupes

(cherry picked from commit 6c2895fd88)
10 months ago
Sloane Hertel 9252584e89
ansible-galaxy - fix exit code for failed role import (#82193) (#82412)
(cherry picked from commit fe81164fe5)
11 months ago
Sloane Hertel 16c40a03ae
[ansible-galaxy] Remove role name conversion when the repo startswith 'ansible-role' (#82508) (#82532)
* Remove role name conversion based on whether the repo name starts with
ansible-role

This was added in 2.3 to match the Galaxy ui behavior of truncating the
'ansible-role-' prefix automatically, but the new backend requires an
alternate name to be provided or defined in the ``galaxy_info``
metadata.

Roles that were imported using the ansible-role-$name convention will
need to use ``--role-name`` or add ``role_name`` to the ``galaxy_info``
dictionary in ``meta/main.yml``.

changelog

* Update changelogs/fragments/fix-default-ansible-galaxy-role-import-name.yml

* Update changelogs/fragments/fix-default-ansible-galaxy-role-import-name.yml

Co-authored-by: flowerysong <junk+github@flowerysong.com>

---------

Co-authored-by: flowerysong <junk+github@flowerysong.com>
(cherry picked from commit d7be3824fe)
11 months ago
Matt Martz b9a03bbf5a
[stable-2.16] Ensure ANSIBLE_NO_LOG is respected (CVE-2024-0690) (#82565) (#82566)
(cherry picked from commit 6935c8e)
11 months ago
Sloane Hertel a25fe10056
Targeted fix for installing roles with symlinks containing '..' (#82165) (#82323)
Set the tarfile attribute to a normalized value from unfrackpath instead
of validating path parts and omiting potentially invald parts

Allow tarfile paths/links containing '..', '$', '~' as long as the
normalized realpath is in the tarfile's role directory

(cherry picked from commit 3a42a00368)
11 months ago
Matt Martz c6a652c081
[stable-2.16] Enable directly using `AnsibleUnsafeText` with Python `pathlib` (#82510)
* Enable directly using `AnsibleUnsafeText` with Python `pathlib`. Fixes #82414
11 months ago
Felix Fontein 94ac041cb7
Fix broken docs RST reference. (#82286) (#82297)
(cherry picked from commit 479949aad2)
11 months ago
Matt Martz 643277b976
Update Ansible release version to v2.16.2.post0. (#82404) 12 months ago
Matt Martz 71a1f55a34
New release v2.16.2 (#82399) 12 months ago
Matt Martz afe3fc184f
Additional Unsafe fixes (#82376)
* Allow older pickle protocols to pickle unsafe classes. Fixes #82356

* Address issues when iterating or getting single index from AnsibleUnsafeBytes. Fixes #82375

* clog frag
12 months ago
Sviatoslav Sydorenko d949af5093
[backport][stable-2.16] 🧪 Replace GitHub SVN integration test with local TLS (#82368)
* [backport][stable-2.16] 🧪 Replace GitHub SVN integration test with local TLS

PR #82334

* Run svn integration test locally with TLS

This patch uses a `trustme` to make an ephemeral CA, and server, and
client TLS artifacts for testing. These are integrated into the Apache
web server via it's `mod_ssl`.

Resolves #82207

* Replace GitHub SVN HTTPS URL w/ localhost over TLS

This change gets rid of the need to use GitHub, which is just about to
drop support for SVN [[1]]. Moreover, it eliminates the need to use
external network for any SVN commands in the test.

[1]: https://github.blog/2023-01-20-sunsetting-subversion-support/

(cherry picked from commit dd0138ba21)

* Implement compat w/ opensuse15, centos7 & rhel7/8
12 months ago
Matt Martz 94e8d99ef4
Update Ansible release version to v2.16.1.post0. (#82349) 1 year ago
Matt Martz 6d40beeef4
New release v2.16.1 (#82346) 1 year ago
Matt Clay 59aa0145d2
Fix various issues in unsafe_proxy (#82326)
- Use str/bytes directly instead of text_type/binary_type
- Fix AnsibleUnsafeBytes.__str__ implementation
- Fix AnsibleUnsafeBytes.__format__ return type
- Remove invalid methods from AnsibleUnsafeBytes (casefold, format, format_map)
- Use `chars` instead of `bytes` to match stdlib naming
- Remove commented out code
1 year ago
Matt Martz 6655343d6d
Update Ansible release version to v2.16.1rc1.post0. (#82304) 1 year ago
Matt Martz 5007068bfe
New release v2.16.1rc1 (#82301) 1 year ago
Matt Martz 270b39f6ff
Ensure that unsafe is more difficult to lose [stable-2.16] (#82293)
* Ensure that unsafe is more difficult to lose

* Add Task.untemplated_args, and switch assert over to use it
* Don't use re in first_found, switch to using native string methods
* If nested templating results in unsafe, just error, don't continue

* ci_complete
1 year ago
Martin Krizek f302b2f592
Allow include_tasks handlers for searching role subdirs (#82248) (#82268)
Fixes #82241

(cherry picked from commit d664f13b4a)
1 year ago
Brian Coca bb787c119d
ansible-pull: expand destinantion directoy to avoid purgin in / (#82030) (#82221)
* expand destinantion directoy to avoid purgin in /

  bad things could happen and help alone is not enough

(cherry picked from commit 8825e60add)
1 year ago
Brian Coca 8a87e1c5d3
no_log avoid masking booleans (#82217) (#82235)
* no_log avoid masking booleans (#82217)

* no_log avoid masking booleans

* clog

* fix issues

(cherry picked from commit 6e448edc63)

* unused boil is hot
1 year ago
Brian Coca fb5d254a79
wait_for, fallback to read for non mmapable files (#82064) (#82233)
* wait_for, fallback to read for non mmapable files (#82064)

* also handle oserror, added debug jic

(cherry picked from commit 8b102dca4a)

* skip problem versions
1 year ago
Martin Krizek 2f7376ce06
flush_handlers: handle a failure in a nested block with force_handlers (#81572) (#82197)
Fixes #81532

ci_complete

(cherry picked from commit a8b6ef7e7c)
1 year ago
Maxwell G 32aedb8bab
setup.cfg: add `Programming Language :: Python :: 3.12` classifier (#82152)
ansible-core 2.16+ supports Python 3.12. This corrects missing metadata.
1 year ago
Brian Coca 71b00cefac
restore role param precedence (#82106) (#82138)
* add test for setfact/param override

(cherry picked from commit 20a54eb236)
1 year ago
Abhijeet Kasurde 6f8261bcf9
[bp-2.16] Fix the strategy plugin description in keywords (#82133)
Fixes: https://github.com/ansible/ansible-documentation/issues/762

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 8ecc1d485b)
1 year ago
Jordan Borean c2a3cad466
Remove duplicate winrm test (#82124) (#82127)
(cherry picked from commit f8a9fd4758)
1 year ago
Matt Davis 75bce4b9d5
add pep668 note to pip module docs (#82096) (#82098)
(cherry picked from commit 3ea5304a57)
1 year ago
Brian Coca e13569d0e2
ansible-pull now handles all secret files CLI options (#82009) (#82070)
* ansible-pull added missing pasthrough for secrets

 Both become and connection password file options were missing.
 Also added test

(cherry picked from commit 99e0d25857)
1 year ago
Brian Coca 6cfa8ec021
Fix Jinja plugin deduplication (#82002) (#82053)
for j2 plugins dedupe on path and  not basename
for j2 this is a container file , for other plugins file name == plugin name

(cherry picked from commit b4566c18b3)
1 year ago