Commit Graph

4066 Commits (7a9f14b19ea5e51906be2d8b670fbf5349e9b16c)

Author SHA1 Message Date
Matt Davis 7a9f14b19e
Revert #83504 (#83566)
* Revert "[stable-2.17] dnf: follow-up on is_newer_installed arches fix (#83556) (#83563)"

This reverts commit fa40503191.

* Revert "[stable-2.17] dnf - arches must be the same in the is_newer_installed check (#83417)"

This reverts commit 6966b53b5b.
5 months ago
Abhijeet Kasurde d1c94fe110
[stable-2.17] package_facts: ignore warnings by apk on stderr (#83519)
* [stable-2.17] package_facts: ignore warnings by apk on stderr

Ignore warnings sent by apk cli on stderr

Partial backport of https://github.com/ansible/ansible/pull/83149

Fixes: #83501

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* CI fixes

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

---------

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 months ago
Matt Davis d37145f25f
New release v2.17.2rc1 (#83545) 5 months ago
Martin Krizek 6966b53b5b
dnf - arches must be the same in the is_newer_installed check (#83417) (#83504)
Fixes #83406

(cherry picked from commit 2930a4664c)
5 months ago
Brian Coca 850da817c5
linear strategy, show templated task name on start (#83473) (#83486)
we only templated in some cases but when queueing we could get an untemplated name for the 'on start' event.

(cherry picked from commit 0d28705ce5)
5 months ago
Brian Coca e90cfa4ed9
hostvars templating fix, override serialization (#83509) (#83515)
fixes #82872
nicer implementation courtesy of nitzmahone

(cherry picked from commit 6c0f4c8a2d)
5 months ago
Martin Krizek ddadca052f
Fix tb for when env var contains % (#83499) (#83506)
Fixes #83498

Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
(cherry picked from commit a8e4106c47)
5 months ago
Martin Krizek 022b425d86
dnf, dnf5: fix installing via wildcard (#83481) (#83491)
Fixes #83373

(cherry picked from commit 0ee6e39615)
5 months ago
Abhijeet Kasurde 2330c4386b
[stable-2.17] replace: update after/before example (#83472)
Fixes: #83390

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 224853b684)
5 months ago
Matt Martz b0f56de75a
New release v2.17.1 (#83462) 6 months ago
Matt Clay d055381c4a
[stable-2.17] ansible-test - Update PyPI test container to 3.1.0 (#83432). (#83439)
(cherry picked from commit 5af5b4b6c8)
6 months ago
Matt Martz 10cd99e9c7
New release v2.17.1rc1 (#83408) 6 months ago
Martin Krizek b15c68418b
Validate and process Handler.listen only once (#83400) (#83405)
Fixes #83392

(cherry picked from commit cbbf06893e)
6 months ago
Matt Martz a47a6ebc62
[stable-2.17] Properly quote all needed components of shell commands (#83365) (#83396)
* [stable-2.17] Properly quote all needed components of shell commands (#83365)

* Properly quote all needed components of shell commands

* Use self.quote, add new self.join
(cherry picked from commit 93b8b86)

Co-authored-by: Matt Martz <matt@sivel.net>

* remove new function
6 months ago
Jordan Borean cad5663af1
powershell - Improve Add-Type tempdir handler (#83080) (#83345)
Improves the Add-Type temporary directory handler to include a retry
mechanism and not fail on an error. Deleting a temporary file used in
compilation is not a critical error and should improve the reliability
of Ansible on Windows hosts.

(cherry picked from commit b8f1add983)
6 months ago
Abhijeet Kasurde 92630e54ff
[stable-2.17] Fix Test failure with cowsay installed/present (#83351)
(cherry picked from commit e07b4edc54)

Co-authored-by: MajesticMagikarpKing <69774548+yctomwang@users.noreply.github.com>
6 months ago
Sloane Hertel 76c7dfd968
Fix task.resolved_action callbacks (#82003) (#83329)
* Fix task.resolved_action for callbacks when playbooks use action or local_action

* Fix using module_defaults with 'action' and 'local_action' task FA and add a test case

Fixes #81905

(cherry picked from commit f2435375a8)
6 months ago
Matt Martz a26c0f7b50
New release v2.17.0 (#83280) 6 months ago
Matt Martz 24a7dd9f2e
New release v2.17.0rc2 (#83242) 7 months ago
Felix Fontein a7258d9bdc
Correctly treat separate paragraphs in top-level descriptions as separate paragraphs. (#83155) (#83173)
(cherry picked from commit e3d4c20f6e)
7 months ago
Jordan Borean d9fa3b225f
Add version ceiling for pypsrp (#83122) (#83164)
* Add version ceiling for pypsrp

Add a version ceiling for the pypsrp requirements. This ensures that the
future v1.0.0 release won't impact existing users who install the
library using the version range specified.

* Use constraints file

* Add changelog for this change

(cherry picked from commit 2ed6c30929)
7 months ago
Brian Coca 7b9aa6ca0d
display: fix log verbosity (#83179) (#83191)
* display, ensure we have a logger before we log

(cherry picked from commit 2816922cd6)
7 months ago
Abhijeet Kasurde 9c14a7a3e4
[stable-2.17] uri: update docs for follow_redirects (#83176)
* Updated the docs for the parameter follow_redirects

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 months ago
flowerysong ee3dfd2d4a
ansible-doc: fix typo in output (#83205) (#83207)
(cherry picked from commit f5b945bf6a)
7 months ago
Matt Martz 18266a596a
New release v2.17.0rc1 (#83160) 7 months ago
Sloane Hertel 7768360a03
Fix installing roles containing symlinks (#82911) (#83136)
* Fix installing roles containing symlinks

Fix sanitizing tarfile symlinks relative to the link directory instead of the archive

For example:

role
├── handlers
│   └── utils.yml -> ../tasks/utils/suite.yml

The link ../tasks/utils/suite.yml will resolve to a path outside of the link's directory, but within the role

role/handlers/../tasks/utils/suite.yml

the resolved path relative to the role is tasks/utils/suite.yml, but if the symlink is set to that value, tarfile would extract it from role/handlers/tasks/utils/suite.yml

* Replace overly forgiving test case with tests for a symlink in a subdirectory of the archive and a symlink in the archive dir when these are not equivalent.

* Build test case from role files to make it easier to add test cases

Fixes #82702
Fixes #81965
Fixes #82051

(cherry picked from commit e84240db84)
7 months ago
Brian Coca 07ad1b2641
inspect components, ansible_managed templatable (#83053) (#83130)
* inspect components, ansible_managed templatable

fixes #82322

(cherry picked from commit 124d03145c)
7 months ago
Martin Krizek 86b1946b33
handlers: fix executing in lockstep using linear (#83030) (#83072)
Fixes #82307

(cherry picked from commit a3cdd831b3)
8 months ago
Martin Krizek 482648494e
Add changelog about target Python versions support (#83071)
See #83054
8 months ago
Abhijeet Kasurde ad2a1a5fbe
[bp-2.17] facts: Add a generic detection for VMware product name (#83023)
* Use startswith instead of hardcoded values in VMWare product
  detction

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
8 months ago
Brian Coca 065918698d
ansible-config: ensure we get templated default (#82974) (#83008)
AKA all defaults rendered

(cherry picked from commit 46137127a2)
8 months ago
Martin Krizek 9ba5d72432
2.17: dnf5: replace removed API calls and add fallbacks (#83025)
* dnf5: replace removed API calls (#83020)

* dnf5: replace removed API calls

bfb6f32e15
96c9188f9c

* call set_group_with_name instead of setting group_with_name

c7b88428f3

---------

Co-authored-by: Matt Martz <matt@sivel.net>
(cherry picked from commit 4e57249d59)

* Fallbacks for brand new APIs that don't exist in released dnf5 (#83022)

(cherry picked from commit 57750e2cf7)

---------

Co-authored-by: Matt Martz <matt@sivel.net>
8 months ago
Matt Martz a429bc3e64
New release v2.17.0b1 (#83000) 8 months ago
Jordan Borean fb01c69021
fetch - add error check on calculated dest (#82970) (#82991)
Add explicit error when the calculated dest path for fetch becomes a
local directory. The existing behaviour will not be checked unlike when
the path did not end with a trailing slash.

(cherry picked from commit 179bc1dabd)
8 months ago
Matt Martz 9e622ddb67
[stable-2.17] Unsafe persistence (#82779)
* 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

(cherry picked from commit 270b39f6ff)

* 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

(cherry picked from commit 59aa0145d2)

* 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

(cherry picked from commit afe3fc184f)

* [stable-2.16] Enable directly using `AnsibleUnsafeText` with Python `pathlib` (#82510)

* Enable directly using `AnsibleUnsafeText` with Python `pathlib`. Fixes #82414

(cherry picked from commit c6a652c081)

* Prevent failures due to unsafe plugin name (#82759)

(cherry picked from commit 56f31126ad)

* Address issues from merge conflicts

---------

Co-authored-by: Matt Clay <matt@mystile.com>
Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
8 months ago
Brian Coca 4bc6ffb2aa
Eaiser package mgr overrides (#82629)
Added variable to override auto detection



Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: Matt Martz <matt@sivel.net>
8 months ago
Sloane Hertel 4bddbe69d5
Fix traceback inheriting from NetworkConnectionBase and add integration tests (#82954)
Co-authored-by: Jeroen van Bemmel <jvb127@gmail.com>
8 months ago
Sloane Hertel 478e139195
remove nonexistent url from role templates (#82933)
* Remove obsolete v1 link for role platforms from the role templates
* Delete platforms block entirely
8 months ago
Abhijeet Kasurde bcaae4c435
systemd_service: Update docs regarding required_* (#82917)
* Update the documentation regarding required_one_of and required_by
  in systemd_service

Fixes: #82914

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
8 months ago
Abhijeet Kasurde 21a987b8b6
connection: update test coverage for SSH connection plugin (#82916)
* connection: update test coverage for SSH connection plugin

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
8 months ago
Matt Clay 31901d23e7
ansible-test - Remove FreeBSD 13.2 (#82951) 8 months ago
Abhijeet Kasurde 8280fbc776
ansible-test - Remove Alpine 3.18 (#82116)
Co-authored-by: Matt Clay <matt@mystile.com>
8 months ago
Sloane Hertel b3d8cdde5d
fix handling allow_duplicates with the role cache (#82691)
allow_duplicates is not part of the role uniqueness, so the value on the cached role may not match the current role.

* remove the allow_duplicates check from Role.has_run() which operates on the deduplicated role
* check the current role's allow_duplicates value in the strategy

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
8 months ago
Brian Coca 8704b9fc29
centralize and complete the internal static vars (#82872)
* centralize and complete the internal static vars

These vars are internal and should not be overridden nor templated
from inventory nor hostvars.
8 months ago
mansoor e3f4fe4fb9
ansible-test - Remove macos/13.2 remote from `ansible-test`
Co-authored-by: Sviatoslav Sydorenko <webknjaz@redhat.com>
8 months ago
Brian Coca fde206499d
async support check mode (#82901)
Allow async tasks to run in check mode
Add check_mode support to async_status
Add tests, also for 'hidden' async mode in gather_facts/parallel
8 months ago
Sloane Hertel b639bd1fd4
Allow "role_name : " prefix for notifying handler listen topics (#82854)
* Allow role name prefix for handler task listen topics

For example,

- name: handler name
  debug:
  listen: topic1

can be notified using `topic1`, `role : topic1` if the handler is in a
standalone or collection role, and `ns.col.role: topic1` if the role is
in a collection, the same way handler names work.

changelog

* fix changelog and tests
8 months ago
Abhijeet Kasurde 8fec1575e6
apt: handle options while installing python3-apt (#82913)
* apt: handle options while installing python3-apt

* While installing python3-apt library, honor parameter
  such as install_recommends and dpkg_options

Fixes: #40608

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* Review changes

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

---------

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
8 months ago
snipfoo 5f4e332e37
Fix condition for unquoting configuration strings from ini files (#82388)
* Add prefix to `origin` when configuration variables come from ini files

Fixes ansible#82387

This change was suggested by @bcoca in
https://github.com/ansible/ansible/pull/82388#discussion_r1424235728 and
https://github.com/ansible/ansible/pull/82388#discussion_r1424249732

When configuration variables come from an ini file, their `origin` is
now set to `ini: <file>`. Similarly, once supported, YAML configuration
files will have their `origin` as `yaml: <file>`.

Consequently, since unquoting configuration strings should happen if and
only if they come from an ini file, this condition boils down to testing
whether their `origin` starts with `ini:`.

* Do not add prefix to `origin` but explicitly pass `origin_ftype`

So as not to rely on a specific format of the `origin` string,
as suggested by @sivel in
https://github.com/ansible/ansible/pull/82388#issuecomment-1881714871
8 months ago
Abhijeet Kasurde a870e7d0c6
Bump bundled distro version to 1.8.0 (#81765)
* Bump bundled distro version to 1.8.0

* Bump bundled distro version from to 1.8.0 from 1.6.0

Fixes: #81713

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* Remove sanity entries

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

---------

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
8 months ago