Commit Graph

4076 Commits (devel)

Author SHA1 Message Date
Abhijeet Kasurde b70248eb22
Warn if the binary is unavailable using get_bin_path (#83258)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2 weeks ago
Brian Coca 7e0a476ba2
setup module, make missing sysctl minor issue (#81297)
Signed-off-by: Brian Coca <brian.coca+git@gmail.com>
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2 weeks ago
Abhijeet Kasurde ac6200b597
Refactor dmidecode fact gathering code (#83211)
* Code now bails out early if dmidecode command is unavailable

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
3 weeks ago
Abhijeet Kasurde f7d7890df9
Use inclusive word: logical (#83232)
Use word 'logical' instead of non-inclusive word

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
3 weeks ago
Abhijeet Kasurde 036d14f1e6
Darwin: add unit tests for hardware fact gathering (#83212)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
4 weeks ago
Peter Whall 417db213c0
facts: Update RAID devices regex for FreeBSD (#82081)
Added support FreeBSD RAID devices and regex to match partitions as well as slices. 
RAID device list is taken from here: https://github.com/freebsd/freebsd-src/blob/main/usr.sbin/bsdconfig/share/device.subr
4 weeks ago
Matt Davis 889012e29e
clean up ansible-connection (#82992)
* clean up ansible-connection stuff

* eliminate unnecessary usage of pty/termios
* always use default pickle protocol
* remove unnecessary wire hashing

Co-authored-by: Kate Case <this.is@katherineca.se>
1 month ago
Matt Martz cd9c4eb5a6
Gather sysinfo facts on s390 (#83157) 1 month ago
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>
1 month ago
Thomas Sjögren 7f93f6171d
add systemd version and features fact (#83083)
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
1 month ago
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>
2 months ago
Matt Clay 1c17fe2d53
Drop Python 3.7 support (#82982) 2 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>
2 months ago
Abhijeet Kasurde aecffcb896 pylint: update for use-yield-from
* With Pylint 3.1.0, use-yield-from check is enabled

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2 months ago
Sloane Hertel 2bb09bfd12
atomic_move - fix preserving extended acls (#82818)
* use copystat to copy as many attributes as possible before os.rename

update unit test mocks for updated method of attribute preservation

add integration test for lineinfile case

remove erroneous `- meta: end_play` from lineinfile test suite

* add keep_dest_attrs parameter to control whether src attributes are
copied initially, and for existing destinations, whether the src is
updated using the dest before being renamed

consolidate with copy unsetting extended attrs

ci_complete
3 months ago
Abhijeet Kasurde 2cf52daa03
Handle error raised when argument validation (#82783)
* Handle error raised when argument validation with elements=int
  and value is not within choices

Fixes: #82776

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
3 months ago
Abhijeet Kasurde dd44449b6e
Use of constant for 644 permission variable (#82762)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
3 months ago
Orion Poplawski 38006103dc
Fixed typo 'must by' to 'must be' (#82769) 3 months ago
tikfj 4edd6ba04f
Add MIRACLE LINUX as RedHat OS Family (#82722)
Co-authored-by: Taiki Fujiwara <taiki.fujiwara@miraclelinux>
3 months ago
Matt Martz 11efa5c48b
Reduce complexity of Request.open (#81988) 4 months ago
Martin Krizek a10d255e0b
dnf,dnf5 - add the best option and fix nobest (#82627)
best/nobest options are one of the options whose default values are set
by an OS distribution. For example in our CI, both Fedora and RHEL set
the best option to different default values. As such we should defer to
the distributions for the default value and not change it by default but
if users wish to change it they can do so explicitly.

Currently the dnf module sets the nobest option inconsistenly and not for
all cases. This patch fixes that to reflect the behavior described
above. In addition adding the best option for both dnf and dnf5 modules
since the best option is prefer to nobest in dnf while in dnf5 nobest is
completely removed in favor of best.

Fixes #82616
4 months ago
Martin Krizek f024cf35d7
Remove the yum module, redirect it to dnf (#81895)
Fixes #81728
4 months ago
Yacht Shaver c7334ea92c
Fix url encoded credentials in netloc (#82552)
Prior to this commit, it was impossible to use a module like dnf with a
URL that contains a username with an @ such as an email address
username, because:

  dnf:
    name: https://foo@example.com:bar@example.com/some.rpm

Would cause netloc parsing to fail. However, the following:

  dnf:
    name: https://foo%40example.com:bar@example.com/some.rpm

Would also fail because ansible would *not* URL-decode the credentials,
causing the following to be base64 encoded in the Authorization header:

  Zm9vJTQwZXhhbXBsZS5jb206YmFyCg==

Which decodes to:

  foo%40example.com:foo

Which is *not* the authorized username, and as such, *won't* pass basic
auth.

With this commit, Ansible's url lib behaves like curl, chromium, wget,
etc, and encodes the above to:

  Zm9vQGV4YW1wbGUuY29tOmJhcgo=

Which decodes to:

  foo@example.com:bar

Which will actually pass the HTTP Basic Auth, and is the same behaviour
that you will find ie. with:

  curl -vvI https://foo%40bar:test@example.com 2>&1 |grep Auth | awk '{ print $4 }'
4 months ago
Martin Krizek d9709c5ae9
module_utils/basic.py: remove PY2 compat (#81989) 5 months ago
Harshvardhan Sharma 623e0eee42
Add Alp-Dolomite to Suse family list (#82496) 5 months ago
Abhijeet Kasurde ceaf68a02c
Deprecate `required` param in get_bin_path (#82466)
* Deprecate `required` param in get_bin_path

* The parameter `required` in process.get_bin_path API
  is deprecated. Will be removed in 2.21

Fixes: #82464


Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
5 months ago
Yinchuan Song 0a45dad884
Add VMware virt detection for hardware version of ESXi 8.0. (#82455)
* Add VMware virt detection for hardware version of ESXi 8.0.

* Add changelog for PR#82455
5 months ago
Danny Luwel 9b002d2e63
check if there attributes to set (#78707)
Fixes: #76727
6 months ago
Brian Coca 1dd0d6fad7
remote log info (#81711)
Both posix and powershell avenues updated to allow for customized string logging on remote

Co-authored-by: Jordan Borean <jborean93@gmail.com>
6 months ago
Brian Coca e80507af32
fact_gathering improve linux thread counts (#82261)
don't use `//` aka `floor()` as some architectures show counts of 1.9 threads per CPU and market as 2 per CPU, `round()` will be closer to that.
6 months ago
Abhijeet Kasurde 8fd1aa0d2e
syslog: Handle ValueError raised while sending logs to syslog (#82225)
* ValueError exception is raised when Null Character is sent
  to syslog.syslog with Python 3.12.
* Handle this error gracefully instead of stacktrace

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 months ago
Brian Coca 6e448edc63
no_log avoid masking booleans (#82217)
* no_log avoid masking booleans

* clog

* fix issues
7 months ago
Ikko Eltociear Ashimine 9c09ed7392
Fix typo in validation.py (#82195)
covert -> convert
7 months ago
Jordan Borean b34f4a559f
Add support for TLS 1.3 Post Handshake Auth (#82063)
TLS 1.3 adds a different method it can use to request a client
certificate after the handshake but Python does not allow this by
default. This commit sets the attribute needed to enable this scenario
when using client certificates on Python 3.8+, 3.7.1+.
7 months ago
Jordan Borean f5d7dc1a97
Legacy.psm1 - Add note telling people not to use function (#82076) 7 months ago
Abhijeet Kasurde e8ef6b7d7c
Consolidate systemd detection logic (#81809)
* Add logic to consider the canary location for systemd files

Fixes: #80975

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 months ago
Adam Ross b815b15362
Fix additional spelling errors in builtin modules (#82012) 7 months ago
Jordan Borean 22568305d6
Add ignore invalid options override for mod wrapper (#81899)
Adds an option that can have an action plugin tell the module to ignore
options that do not fit its arg spec. This is to enable support for core
running modules that exist outside of the collection that may not be new
enough to support some of the options supplied to it.
8 months ago
Isaac Chung 5812cabaf5
Fix typos in builtin modules (#81969) 8 months ago
Sviatoslav Sydorenko d2ba76c117
Remove Python `< 3.5` `selectors` fallbacks (#81872) 8 months ago
Sviatoslav Sydorenko 46623b0a96
Deprecate `pycompat24` (#81896) 8 months ago
Sviatoslav Sydorenko 350a394185
Remove Python 2 importlib.import_module compat (#81879) 8 months ago
Matt Martz 92d2c66db2
Remove py2 support from urls.py (#81880) 8 months ago
Matt Clay 9f899f9492
Require `from __future__ import annotations` (#81902) 8 months ago
Abhijeet Kasurde c0eefa955a
docs: update error message (#81554)
* Reword the error message when the module fails to parse parameters
  in JSON format
* misc typo fixes

Fixes: #81188

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
8 months ago
Matt Clay b94ee1cefd
Drop Python 2.7 and Python 3.6 support (#81866)
* Drop Python 2.7 and Python 3.6 support

* Remove obsolete _json_compat
8 months ago
Abhijeet Kasurde 304e63d76e
Add family fallback for Amzn to register as RedHat (#81755)
* Add family fallback for Amzn to register as RedHat

Fixes: #80882

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
8 months ago
Sloane Hertel b3408ab80b
Fix dnf module crash for non-existent url (#81801)
* ci_complete ci_coverage
8 months ago
Abhijeet Kasurde ce3954ba74
Bump sanity test requirements for 3.12 (#81843) 8 months ago
Hungtsetse 51f2ddd445
Extend mount info (#81768) 8 months ago