Commit Graph

32773 Commits

Author SHA1 Message Date
Abhijeet Kasurde 2b65166a29
uri: deprecate 'yes' or 'no' value in follow_redirects param (#83169)
* uri (module and lookup): deprecate 'yes' or 'no' value in follow_redirects param

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-05-02 02:43:22 +00:00
Matt Martz cd9c4eb5a6
Gather sysinfo facts on s390 (#83157) 2024-05-01 11:10:58 -07:00
Felix Fontein 585ef6c55e
Show examples in role entrypoint argument specs. (#82671) 2024-05-01 11:27:50 -04:00
Felix Fontein e3d4c20f6e
Correctly treat separate paragraphs in top-level descriptions as separate paragraphs. (#83155) 2024-04-30 17:15:35 +02:00
Jordan Borean 2ed6c30929
Add version ceiling for pypsrp (#83122)
* 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
2024-04-30 10:09:35 +10:00
Don Naro dfc559866a
minor fix for misspelling (#83156)
This change fixes a minor spelling error, indivudually ==> individually.
2024-04-29 15:45:21 +00:00
Abhijeet Kasurde 628ce5a62e assemble: update argument_spec with 'decrypt' option
* decrypt option is used by assemble action plugin.
  Add this parameter to remove failure raised by
  validate-modules:nonexistent-parameter-documented

Fixes: #80840

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-04-25 12:22:19 -07:00
Alex Willmer d5edb77db4 Add description of ansible.utils.path.unfrackpath() basedir argument 2024-04-25 12:11:38 -07:00
Sloane Hertel e84240db84
Fix installing roles containing symlinks (#82911)
* 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
2024-04-24 11:07:29 -04:00
Brian Coca 124d03145c
inspect components, ansible_managed templatable (#83053)
* inspect components, ansible_managed templatable

fixes #82322
2024-04-23 12:43:47 -04:00
Hrishikesh Mishra 718edde465
Update distro version in __init__.py (#83114)
Update the bundled package distro from 1.6.0 to 1.9.0 in __init__.py

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-04-23 08:26:42 -07:00
Sven 33d1224e83
password_hash: update docs about bcrypt (#81675)
Signed-off-by: Sven Kieske <kieske@osism.tech>
2024-04-23 01:20:04 +00:00
Thomas Sjögren 7f93f6171d
add systemd version and features fact (#83083)
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
2024-04-18 21:22:56 -04:00
Abhijeet Kasurde 5dac5d365a
systemd_service: handle failure when mask operation fails (#83079)
* Handle the mask operation failure instead of just
  marking state changed.

Fixes: #81649

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-04-18 16:28:30 +00:00
Thomas Sjögren ae2234f185
add countme option to yum_repository (#82831)
* add countme option to yum_repository

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* Update lib/ansible/modules/yum_repository.py

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>

* add changelog fragment

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* add version_added

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* Update lib/ansible/modules/yum_repository.py

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>

* Update lib/ansible/modules/yum_repository.py

* Update lib/ansible/modules/yum_repository.py

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>

* Update lib/ansible/modules/yum_repository.py

---------

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
2024-04-18 13:51:22 +02:00
Abhijeet Kasurde 6b3bab6476
plugin: fixed examples of csv lookup plugin (#83068)
Fixes: #83031

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-04-17 15:08:22 -07:00
Brian Coca 0c51a30d93
ansible-config: add 'validate' option (#83007)
We can now validate both ansible.cfg and 'ANSIBLE_' env vars
match either core (-t base), installed plugin(s) (-t <plugin_type>) or both (-t all)
2024-04-17 16:26:05 -04:00
Martin Krizek a3cdd831b3
handlers: fix executing in lockstep using linear (#83030)
Fixes #82307
2024-04-16 17:45:18 +02:00
Ernie Hershey 82d91f0952
Make inventory --list help text wording consistent (#83035) 2024-04-15 10:21:28 -04:00
Matt Martz 57750e2cf7
Fallbacks for brand new APIs that don't exist in released dnf5 (#83022) 2024-04-12 10:15:49 +02:00
Martin Krizek 3a6f825a8e
dnf - honor installroot and substitutes in paths (#83011)
In #80094 support for var substitution for cachedir was added but there
are more options that should be supported. Using an API for
prepend_installroot which should be done anyway provide that feature
so use that. In addition, perform the operation once all substitutes
are in place (releasever as well).
2024-04-12 09:34:46 +02:00
Martin Krizek 4e57249d59
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>
2024-04-11 14:57:44 -05:00
Abhijeet Kasurde cb81801124
facts: Add a generic detection for VMware product name (#83012)
* Use startswith instead of hardcoded values in VMWare product
  detction

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-04-11 15:07:36 -04:00
David Greaves 3076478892
Extend systemctl is-enabled check to handle "enabled-runtime" too. (#77754)
In general the existence of a runtime-enabled unit should not prevent
a persistent enable being set.

Specifically this handles the case where there is an entry in fstab
for a mount point (which is retained to allow manual mount/umount to
take place) and yet a systemd mount unit needs to be deployed to
handle other unit options. There will be a generator-created unit file
which shows the unit as enabled-runtime and the persistent enable of
the mount unit will fail.

Additionally improve the comments and modify the code to use rsplit()
and the "in" notation since "systemctl is-enabled" is documented to
return specific values in the cases of interest.

---------

Signed-off-by: David Greaves <david@dgreaves.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-04-10 10:09:04 -04:00
Benoît Knecht d304fd86c2
modules/dnf: Substitute variables in DNF cache path (#80094)
The cache directory can be specified with variables that are expanded by DNF, for example,

```
cachedir=/var/cache/yum/$basearch/$releasever
```

But the `dnf` module would use that path literally, instead of replacing
`$basearch` and `$releasever` with their values.

This commit ensures that variables in `cachedir` are properly substituted.

Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
2024-04-09 13:11:43 -07:00
Brian Coca 46137127a2
ansible-config: ensure we get templated default (#82974)
AKA all defaults rendered
2024-04-09 14:57:26 -04:00
Abhijeet Kasurde bb138b1f6e
play_context: remove deprecated PlayContext.verbosity (#82993)
Fixes: #82945

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-04-09 11:08:52 -04:00
Matt Clay cd365057d3 Remove more Python 2.x compat code 2024-04-08 12:55:52 -07:00
Sloane Hertel 61e18572bb
Play - remove deprecated ROLE_CACHE in favor of role_cache (#82979) 2024-04-04 23:07:25 +00:00
Abhijeet Kasurde 92feda2e13
paramiko_ssh: remove deprecated ssh_*_args parameters (#82988)
* removed ssh_args parameter
* removed ssh_extra_args parameter
* removed ssh_common_args parameter

Fixes: #82939
Fixes: #82940
Fixes: #82941

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-04-04 12:51:22 -07:00
Martin Krizek 14a2f6e2ab
Remove Python 2 traces from dnf/dnf5 modules (#82985) 2024-04-04 12:39:11 -07:00
Sloane Hertel 971c49b711
Remove deprecated vars keyword syntax as a list of dictionaries, it is now required to be a single dictionary (#82980)
Update unit test
2024-04-04 12:34:54 -07:00
Sloane Hertel e03fcda6da
Remove deprecated configs for DEFAULT_FACT_PATH, DEFAULT_GATHER_SUBSET, and DEFAULT_GATHER_TIMEOUT (#82978)
Instead, set module_defaults at the play level, which will apply to the
gather_facts keyword as well as any
ansible.builtin.setup/ansible.builtin.gather_facts tasks.

- hosts: all
  gather_facts: yes
  module_defaults:
    ansible.builtin.setup:
      fact_path: /path/to/facts.d/
      gather_subset: '!all,!min,local'
      gather_timeout: 20
  tasks:
    # also applies to:
    - ansible.builtin.setup:
    - ansible.builtin.gather_facts:

If you wish to only apply these to the gather_facts keyword, set as play keywords.
2024-04-04 12:32:25 -07:00
Abhijeet Kasurde 52529f0b8e
plugins: remove deprecated features (#82976)
* Remove deprecated REQUIRE_WHITELIST
* Remove deprecated module_blacklist

Fixes: #82947

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-04-04 12:29:50 -07:00
Martin Krizek 5f36fc9a46
to_nice_json: document the indent option (#82973)
Specifying indent as an option to `to_nice_json` has been possible in
contrary to what documentation states.

Follow-up to https://github.com/ansible/ansible/pull/82912
2024-04-04 12:27:50 -07:00
Jordan Borean 179bc1dabd
fetch - add error check on calculated dest (#82970)
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.
2024-04-04 12:26:21 -07:00
Abhijeet Kasurde ea55dddc6a
Remove deprecated 'loader' argument (#82968)
* remove deprecated 'loader' argument from listify_lookup_plugin_terms API

Fixes: #82949

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-04-04 12:23:18 -07:00
Abhijeet Kasurde 208168ee4c
apt: add a note about extraneous quotes in package name (#82960)
* add a note for user to not to include extraneous single or double
  quotes while specifying package name with a specific version.

Fixes: #82763

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-04-04 12:12:53 -07:00
Matt Clay 1c17fe2d53
Drop Python 3.7 support (#82982) 2024-04-04 09:41:14 -07:00
Matt Martz 76fe4e8a71
Bump devel to 2.18.0.dev0 (#82934)
* Bump devel to 2.18.0.dev0

* Add ignores for 2.18 deprecations
2024-04-02 21:18:18 +00:00
Sloane Hertel 85d8673860
Follow up to #82933 - remove platforms from templates (#82961) 2024-04-02 17:06:39 -04:00
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>
2024-04-02 16:38:05 -04:00
Sloane Hertel 4bddbe69d5
Fix traceback inheriting from NetworkConnectionBase and add integration tests (#82954)
Co-authored-by: Jeroen van Bemmel <jvb127@gmail.com>
2024-04-02 11:19:07 -04:00
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
2024-04-02 11:15:12 -04:00
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>
2024-04-02 11:06:40 -04:00
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>
2024-04-02 11:05:41 -04:00
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>
2024-03-28 15:33:09 -04:00
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.
2024-03-28 15:06:35 -04:00
Brian Coca 5c804cbf6f
ssh docs fixes (#82902) 2024-03-26 17:07:32 -04:00
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
2024-03-26 17:06:29 -04:00