Commit Graph

55301 Commits (devel)
 

Author SHA1 Message Date
net0pyr 6b5301eba7
Fix user module to not create /nonexistent on FreeBSD (#86415)
Fixes an issue where the user module would create the /nonexistent directory when modifying a user to add them to a group on FreeBSD. The /nonexistent path is a standard convention for system accounts on FreeBSD that should not exist physically on disk.

This commit adds a check in the FreeBsdUser.modify_user() method to skip home directory creation when the home path is /nonexistent.

Fixes #86368

Co-authored-by: zykov <zykov@biocad.ru>
4 days ago
Abhijeet Kasurde 06fce4e2a2
strategy: added a space in message (#86373)
* strategy: added a space in message


Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
Co-authored-by: flowerysong <junk+github@flowerysong.com>
4 days ago
Abhijeet Kasurde a3782f0e7d
unarchive: make timezone aware timestamp (#85799)
* Consider the timezone offset while creating timestamp from `zipinfo -T`
  information. This information is required while comparing to mtime of the file
  on local filesystem (for idempotency purposes).

Fixes: #85779

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
5 days ago
Matt Clay bf349232e2
Remove `sleep 0` Linux kernel bug work-around (#86420)
The ``ActionBase._low_level_execute_command`` method no longer adds ``&& sleep 0`` to commands.
This was a work-around for a 10+ year old Linux kernel bug affecting OpenSSH.
By August of 2016 the fix had been included in kernel versions 4.1.26, 4.4.12, 4.5.6, 4.6.1 and 4.7.

Linux kernel bug report: https://lore.kernel.org/lkml/alpine.LNX.2.00.1512091358290.9574@fanir.tuyoix.net/
OpenSSH bug report: https://bugzilla.mindrot.org/show_bug.cgi?id=2492
5 days ago
Matt Clay 330f40b4f5
ansible-test - Fix codespell test (#86419)
Prevent a traceback when test results are empty.
6 days ago
Matt Clay 113e0bbb93
ansible-test - Expand unwanted pylint check (#86416)
Also remove redundant tests from the validate-modules sanity test.
6 days ago
Gaurav Pathak 6d383558c9
Validate changes in a git repo for combined check and diff mode (#85110)
This commit validates changes in a shallow clone git repo and shows
a diff for combined check and diff mode in case if any old single
full commit sha is provided in version parameter instead of any
branch name or HEAD together with refspec parameter.
At present, if an old commit sha is provided to version parameter
for a shallow clone git repository initially cloned using depth: 1
and if ansible-playbook is executed with --diff --check together,
the command shows:
Failed to get proper diff between <before_sha> and <after_sha>
fatal: bad object <after_sha>
6 days ago
Matt Clay fec9c3d50c
Add codespell sanity test for core (#86418) 6 days ago
Matt Clay d37cec2ea8
Spelling and grammar fixes (#86417) 6 days ago
RealKelsar 869088b959
Fixes Parsing for ClearLinux exposed by Gentoo (#86384)
* Fixes Parsing for ClearLinux exposed by Gentoo changing os-release, Quoting from " to ', also fixes NA parsing to strip both kinds of quotes
1 week ago
Patrick Kingston 28927a70b4
Remove `Install-Python-Debian` from the output of deb822_repository (#86403)
Fixes: #86395
1 week ago
Ariel Otilibili ffa344e37b
Improve to_uuid documentation (#86404)
One has to look into the examples to realize the generaed UUID is a UUIDv5.

As of today, `to_uuid` returns a UUIDv5. Document it.

Link: f2357cdc53/lib/ansible/plugins/filter/core.py (L338-L346)

Signed-off-by: Ariel Otilibili <a.otilibili@instadeep.com>
1 week ago
Sloane Hertel f2357cdc53
Fix module_defaults templating for gather_facts, service, and package actions (#85857)
* Ensure action plugins template module arguments from module_defaults as necessary
2 weeks ago
Matt Clay 3661f34811
ansible-test - Optimize RHEL DNF configuration (#86396) 2 weeks ago
Felix Fontein 612d54fc6f
Fix argument spec for v1 source info schema validation (#86320)
* Fix argument spec for v1 source info schema validation.

* Add changelog fragment.

* Add basic tests for _validate_v1_source_info_schema.
2 weeks ago
daomah 7726bf61a8
Expanded "See Also" section (#86370) 2 weeks ago
Matt Clay 63fdb2079c
ansible-test - Replace Fedora 42 with 43 (#86220)
* ansible-test - Replace Fedora 42 with 43

* Temporarily skip the rpm_key test on Fedora 43

* Stop testing podman as root on Fedora 43
2 weeks ago
Matt Clay e223fbd5f6
Restore xt_comment tests (#86393) 2 weeks ago
Matt Clay 3df8aeed80
ansible-test - Replace RHEL 10.0 with 10.1 (#86387) 2 weeks ago
Matt Clay 69afa45880
ansible-test - Replace FreeBSD 13.5 with 15.0 (#86385)
* ansible-test - Replace FreeBSD 13.5 with 15.0

* Update Kerberos hack for FreeBSD 15
2 weeks ago
Matt Clay 5446d7333b
ansible-test - Replace Alpine 3.22 with 3.23 (#86386) 2 weeks ago
Sam Doran d16aaec92d
ansible-galaxy - Change error to warning when no paths exist (#86341)
* ansible-galaxy - Change error to warning when no paths exist

When listing collections, a warning is much more appropriate than an error
for missing paths.
2 weeks ago
Felix Fontein 2cedaa24b6
default callback: make YAML line width configurable (#85498)
* Make YAML line width configurable.

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2 weeks ago
Will Schlitzer 7665917d51
Change 'blacklist' to 'denylist' in lib/utils/display.py (#86304)
Co-authored-by: Abhijeet Kasurde <Akasurde@redhat.com>
2 weeks ago
Abhijeet Kasurde cc9e71f411
callback: filter _ansible_ in debug message (#84594)
* Drop _ansible_ keys from debug message

Fixes: #69731

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2 weeks ago
Matt Clay 52cd605887
ansible-test - Fix expat on Fedora 42 remotes (#86375) 2 weeks ago
Matt Clay 6c024e24b4
ansible-test - Upgrade to RHEL 9.7 (#86374) 2 weeks ago
Abhijeet Kasurde 5e10a9160c
ansible-test: disable xt_comment testcase for iptables (#86365)
Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
4 weeks ago
sivel / Matt Martz 85d20838ce
state=latest now installs modules when missing. Fixes #73457 (#86328) 1 month ago
Abhijeet Kasurde 039b94c23d
Misc typo fix (#86322)
Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
1 month ago
Sloane Hertel f924902830
adhoc, ansible-console - fix traceback for meta end_play tasks (#86294)
Ensure all entrypoints using TaskQueueManager catch AnsibleEndPlay
1 month ago
Yuxiao Zeng 17fb4af38d
copy - fix reporting changed=True when a single-file dir is copied with remote_src=False (#85834)
* Fix directory path construction in the action plugin

Fixes #85833
1 month ago
Abhijeet Kasurde 9f42cefca6
dnf: Return error message from RPM installation (#86123)
* When RPM scriptlet fails, return those error messages
  for further debugging.

Fixes: #86117
1 month ago
Abhijeet Kasurde 6c0bb0837c
filter: Use datetime.strftime instead of time.strftime (#86261)
* Use datetime.strftime instead of time.strftime which
  supports more directives.

Fixes: #86260

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
1 month ago
Jordan Borean 595b4f0390
winrm - Add better Kerberos error (#86317)
* winrm - Add better Kerberos error

Adds a better error when Kerberos authentication is requested but the
`pykerberos` library is not installed. This also removes the fallback to
basic auth if the username is in the UPN format and no transport/auth
method is specified. This is because a UPN user must be a domain account
and domain accounts cannot be used with basic auth.

* Add more docs about user settings

* Fix some grammar issues
1 month ago
Sviatoslav Sydorenko 7328efbdf3 🧪 Replace `distlib` type ignores with stubs
The stubs are taken from the unmerged PR [[1]] upstream. MyPy is set
up to rely on them instead of the missing package type annotations.

[1]: https://github.com/pypa/distlib/pull/195
1 month ago
Sviatoslav Sydorenko e05b6e7475 Fix types @ `galaxy.collection.galaxy_api_proxy`
This includes enforcing `strict_optional` for the
`ansible.galaxy.collection.galaxy_api_proxy` module in MyPy.
1 month ago
Sviatoslav Sydorenko be8152a2b1 🧪 Fix types @ `ansible.galaxy.collection.gpg`
Most of this patch is coversion from comments to native syntax. It
also includes fixing a strict optional violation.
1 month ago
FestplattenSchnitzel e25cc345fe
deb822_repository: add include, exclude parameters (#86171) 2 months ago
Brian Coca ca6dc93dcc
ansible_local should not trigger deprecation (#86234)
* ansible_local should not trigger deprecation

fixes #86228
2 months ago
sivel / Matt Martz 8a4b184620
fix package installation when specifying architecture without version. Fixes #86156 (#86219) 2 months ago
Martin Krizek 7b4d4ed672
ssh connection: fix sshpass pipe fd leaks (#86141)
When using sshpass the file descriptors leaks would happen in the reset
method that used _build_command that creates the pipe but the command
would not go through _bare_run which closes the pipe.

Another scenario would be _bare_run failing and not all code path would
properly close the pipe.

This patch fixes the issues by:
* move creating the pipe from _build_command closer to where it is used
  in _bare_run
* wrap _bare_run with closing the pipe in case of a failure
* no need to re-create pipe in the retry code
* unrelated but simplify the reset method
2 months ago
Brian Coca 335db20951
vars loading, show file name instead of vars in error (#86277)
* Show file instead of vars on load error

(cherry picked from commit 490795770f34120adc02b08fc24fc50be6ac68a2)
(cherry picked from commit 11a2d02bf2)

* merged

* Update lib/ansible/vars/manager.py

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

---------

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2 months ago
Sviatoslav Sydorenko 251fec31b4 🧪Drop PkgReq stub @ `ansible.galaxy.collection`
This tiny restructuring allows us to get rid of the type ignore.
2 months ago
lixiaoyong01 cc839f013a
Fix typos in apt_key module (#86257)
Co-authored-by: lixiaoyong <lixiaoyong@kylinos.cn>
2 months ago
John Eismeier a5a2b77911
Propose fix typo of targetting (#86242)
Signed-off-by: John E <jeis4wpi@outlook.com>
2 months ago
Abhijeet Kasurde 17f3698384
copy: honor directory_mode when specified with remote_src=True (#86184)
* copy: honor directory_mode when specified with remote_src=True

* Honor directory_mode specified by user when copying directories
  and remote_src=True

Fixes: #81292

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2 months ago
Abhijeet Kasurde 5f2d96c60e
regex: fix example documentation for regex_test (#86172)
Fixes: https://github.com/ansible/ansible-documentation/issues/3246

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2 months ago
sivel / Matt Martz 6bb7bd760f
Fix escaping issue in ansiballz wrapper for sitecustomize (#86236)
* Fix escaping issue in ansiballz wrapper for sitecustomize

* add clog frag
2 months ago
sivel / Matt Martz bff3a9aeb9
Fix docker hostname parsing in ansible-test (#86235)
* Fix docker hostname parsing in ansible-test

* add clog frag
2 months ago