Commit Graph

4164 Commits (68515abf97dfc769c9aed2ba457ed7b8b2580a5c)

Author SHA1 Message Date
Sloane Hertel 2b91c57c85
atomic_move - fix creating file in directory with setgid bit (#83718)
* fix creating file in directory with setgid bit

* add a test using the copy module's content option to create a file in a directory with setgid bit

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
3 months ago
Kellin 0d6b034103
Enable validation of subkeys in rpm key module (#83716)
* Enable validation of subkeys in rpm key module

A gpg subkey may change while the primary key remains the same. Due to
this behavior, there are situations where validation of the primary gpg
key fingerprint is not sufficient because the desired target is actually
the gpg subkey. This change allows the user to validate against either
the fingerprint of the primary gpg key or its subkey.

Signed-off-by: Kellin <kellin@retromud.org>

* Improve tests, add multi-fingerprint

- Improve tests to cover all cases
- add multi fingerprint validation

Signed-off-by: Kellin <kellin@retromud.org>
3 months ago
akire0ne 7b74de069c
fix: `COLOR_INCLUDED` to colorize `included` output (#83711)
adds color included configuration and applies to include message

Co-authored-by: Achille Myette <amyette@drw.com>
3 months ago
Brian Coca 797e6bb220
Add vaulted_file test (#83717)
* Add vaulted_file test
* fix is_encrypted_file while we are here
Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
4 months ago
Martin Krizek d9f1866249
Deprecate remaining safe evals (#83293) 4 months ago
Matt Clay 717f1092e3
ansible-test - Update venv management and sanity requirements (#83729)
* ansible-test - Update venv management
* Upgrade from pip 24.0 to 24.2
* Omit `wheel` and `setuptools` from ansible-test managed virtual environments
* Drop pre-release hacks
* Update mypy requirements
* Freeze sanity test requirements
* Update sanity test configuration
* Update sanity ignores
4 months ago
Sloane Hertel 0be66ed6dc
Fix task-adjacent search path in roles (#83621)
* Restore search path in the current task file’s directory for roles
4 months ago
Sloane Hertel 26c8a28d05
csvfile lookup - fix giving an error when no search term is provided (#83710)
Fixes #83689
4 months ago
Brian Coca 885e3766a8
core: raw params better error msg (#83726)
* less confusing error msg
* also remove 'removed' include
4 months ago
Brian Coca c5210ad3eb
Fix display to log severity mapping (#83712)
add caplevel to display to pass through
also reverse dict order as 'last update wins'
added tests ... and also log severity to log

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
4 months ago
Matt Clay 6019f3f425
ansible-test - Update coverage to 7.6.1 (#83723) 4 months ago
Abhijeet Kasurde 91f680a749
Remove extraneous get_bin_path call (#83675)
ip_path is already calculated before calling get_interfaces_info

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
4 months ago
Abhijeet Kasurde 245885177c
systemd facts: Handle AttributeError (#83684)
* Handle AttributeError raised while running systemd facts on
  non-systemd hosts

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
4 months ago
Abhijeet Kasurde 31ad786de1
ansible-doc: handle on_fail (#83676)
Handle errors raised when role doc has errors

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
4 months ago
skupfer 20465ba11a
Add UID and GID min/max keys (#81770)
Fixes: #72183
4 months ago
Karl G 6bf6844a1c
add error handling when parsing values in ini files (#82718)
Fixes: #82717

Co-authored-by: Karl A. Grindley <kgrindley@ll.mit.edu>
4 months ago
Jordan Borean bbf96c250f
winrm - quota retry handling (#83656)
* winrm - quota retry handling

Add a retry attempt when receiving ERROR_WSMAN_QUOTA_MAX_OPERATIONS when
starting a command. This can occur when running a loop with multiple
iterations or an action plugin that runs multiple commands.

* Update pywinrm constraint for test

* Add verbose hint and mark test as destructive
4 months ago
Sloane Hertel ff5deaf62f
fix module_defaults group incorrectly giving deprecation warnings (#83510)
don't display deprecation warnings for actions/modules as a result of using an action_group containing a deprecated plugin
4 months ago
Abhijeet Kasurde d23a2de5f2
Remove selinux import (#83674)
Remove selinux import which was kept for backward compatibility

Fixes: #83657

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
4 months ago
Felix Fontein 3d4bd79574
validate-modules: detect names set mismatch between argument spec and documentation (#83599) 4 months ago
Lee Garrett 7e3916b767
Typo fixes and other bits and bobs (#83672)
Co-authored-by: Lee Garrett <lgarrett@rocketjump.eu>
4 months ago
Abhijeet Kasurde 8e74cdc7b2
Set LANGUAGE env variable is set to a non-English locale (#83671)
Fixes: #83608

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
4 months ago
Jordan Borean a3a92bcc13
Remove explicit shell environment docs (#83649)
Removes the docs for the environment keyword in the shell base plugins
as they are a no-op in the plugins themselves. The environment value is
provided by the action base which gets it from the action base on the
task.environment value. This should avoid confusion around how its being
set and removes some code that is not used at all.
4 months ago
Abhijeet Kasurde fe1183f8ac
Replace random with secrets (#83668)
Use secrets library instead of random.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
4 months ago
Abhijeet Kasurde 504f5b1230
apt: Report change when package is removed (#83547)
While upgrade process removes a package, module should
report changed=True instead of changed=False

Fixes: #46314

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
4 months ago
Sloane Hertel 33565f3774
increase timeout downloading galaxy role URLs (#83562)
* Update the timeout to download role archive to 60 seconds to match collections
TODO: in future make a configurable 'artifact download timeout'
4 months ago
Abhijeet Kasurde cd105d479a
display: warn user about empty log path value (#83381)
Fixes: #79959

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
4 months ago
Matt Clay 79f819dc54
ansible-test - Remove VyOS tests and support files (#83650)
The VyOS remote image required for running the tests is no longer functional.
4 months ago
Alexei Znamensky d36dc70afc
remove ignore clauses for module find (#83575)
add testcase for expanding home dir names
4 months ago
Peter A. Bigot c904bffc7d
debconf: handle boolean value representation consistently (#83601)
* lift code that normalizes value type for boolean vtype to cover both
  branches of conditional.
* remove obsolete and incomplete conversion of type in set_selection.

Fixes: #83594
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
4 months ago
Matt Clay 906c969b55
ansible-test - Improve unknown env error message (#83610) 4 months ago
Brian Coca 0eeb933238
module compression is now again settable via var (#83573)
Previous change overlooked 'uncommenting' the variable entry as a way to update this  to keep the functionality.


Co-authored-by: Glandos <bugs-github@antipoul.fr>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
4 months ago
rebtoor 7cf7dff3a6
Ensure that we are handling DownloadError properly in the dnf module (#83543)
Signed-off-by: Roberto Alfieri <ralfieri@redhat.com>
4 months ago
Matt Clay 9cdfcd9aed
ansible-test - Update nios-test-container to 4.0.0 (#83539) 5 months ago
Dhanesh R 9472005dee
update distro version to 1.9.0 (#83540) 5 months ago
flowerysong 4f6a4534a7
known_hosts: don't modify `AnsibleModule.params` (#83517)
Using this dictionary to store the return values results in
the return values showing up in the returned
`invocation['module_args']`, which is confusing. It also causes all
module arguments to be returned, which is preserved by this change but
should ideally be removed in the future.
5 months ago
Jan Christian Grünhage 83a0975611
Add dinit as a service_mgr (#83489) 5 months ago
Harshvardhan Sharma 43346f1fdc
Add SL-Micro to Suse family list (#83541) 5 months ago
MajesticMagikarpKing edce798713
Fix Creating user directory using tilde always reports "changed" (#83113)
Fixes: #82490
5 months ago
Felix Fontein e5309ba29f
validate-modules: reject option/alias names equal up to casing belonging to different options (#83530)
* Reject option/alias names equal up to casing belonging to different options.

* Update test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/main.py

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
5 months ago
flowerysong 63538f7779
package_facts: fix warning logic (#83520)
* package_facts: fix warning logic

* Refactor so that warnings can work
5 months ago
Martin Krizek 775bc1110e
linear: fix included handlers executing in lockstep (#83209)
Fixes #83019
5 months ago
Martin Krizek 571e2a9551
Fix incorrect rc when executing end_host in rescue (#83522)
Fixes #83447
5 months ago
Brian Coca 6c0f4c8a2d
hostvars templating fix, override serialization (#83509)
fixes #82872
nicer implementation courtesy of nitzmahone
5 months ago
Brian Coca 00ddc27d69
actually show plugin config warnings/deprecations (#82593)
previouslly we recorded but did not show to avoid spam
since we could not dedup from forks, that was already
fixed in another PR so now we can show/display them.

Also:
  * funcitonalize deprecation msg construct from docs
  * reuse formatting func in cli
  * normalize alternatives: most of the code used intended plural
    but some and most data/tests used the singular
  * update schemas and tests

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
5 months ago
Martin Krizek a8e4106c47
Fix tb for when env var contains % (#83499)
Fixes #83498

Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
5 months ago
Martin Krizek 665d2e15d7
dnf: remove legacy code (#83298) 5 months ago
Benoît Knecht 41ba6536cf
facts/hardware: Fix support_discard block device fact (#83480)
Previously, `support_discard` simply returned the value of
`/sys/block/{device}/queue/discard_granularity`. When its value is `0`, then
the block device doesn't support discards; _however_, it being greater than
zero doesn't necessarily mean that the block device _does_ support discards.

But another indication that a block device doesn't support discards is
`/sys/block/{device}/queue/discard_max_hw_bytes` being equal to `0` (with the
same caveat as above). So if either of those are `0`, set `support_discard` to
zero, otherwise set it to the value of `discard_granularity` for backwards
compatibility.

Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
5 months ago
Martin Krizek 2930a4664c
dnf - arches must be the same in the is_newer_installed check (#83417)
Fixes #83406
5 months ago
Martin Krizek 0ee6e39615
dnf, dnf5: fix installing via wildcard (#83481)
Fixes #83373
5 months ago