Commit Graph

12470 Commits

Author SHA1 Message Date
560d3af097 ansible-test - Update http-test-container (#83272)
* Disable cipher suite integration tests

When the client and server both support TLS 1.3, cipher suite selection is effectively a no-op.

Python provides no way to disable TLS 1.3 cipher suites, and no way to prefer user-selected cipher suites.
Since TLS 1.3 includes a mandatory cipher suite, this makes it impossible to induce a cipher suite related error when using TLS 1.3.

* Update multipart form-data integration test

* Fix netrc integration tests

* Update HTTP test host substring

* ansible-test - Update http-test-container
2024-05-19 12:36:00 -07:00
b8483adb33 ansible-test - Update pypi-test-container (#83273) 2024-05-19 12:35:44 -07:00
930f18ea65 ansible-test - Update ansible-test-utility-container (#83274) 2024-05-19 12:35:32 -07:00
c5114e1819 Remove deprecated VariableManager._get_delegated_vars (#83259)
Fixes #82950
2024-05-17 09:32:38 +02:00
b70248eb22 Warn if the binary is unavailable using get_bin_path (#83258)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-05-16 02:32:22 +00:00
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>
2024-05-15 15:19:14 -07:00
65638b4d01 remove old install info when installing collections (#83194)
* Fix cleaning up galaxy server info from previous installations

* changelog
2024-05-14 17:09:55 +02:00
f7d7890df9 Use inclusive word: logical (#83232)
Use word 'logical' instead of non-inclusive word

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-05-10 15:49:53 +00:00
3c280e6c1b dnf5: implement enable_plugin and disable_plugin options (#83105)
80cfea9c25
2024-05-09 10:54:40 +02:00
036d14f1e6 Darwin: add unit tests for hardware fact gathering (#83212)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-05-07 15:33:13 -07:00
523745e02e dnf: integration tests cleanup (#83203)
* remove no longer needed tasks
* remove workarounds
* consolidate conditionals
* remove distros/versions from conditionals that are no longer present
  in CI
2024-05-07 08:42:55 +02:00
57a8eca3af pymarkdown: update docs (#83150)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-05-06 21:52:50 +00:00
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
2024-05-06 13:41:37 -07:00
aed8c080f6 ansible-galaxy, clarify licensing for 'init' templates and results (#83175) 2024-05-06 16:22:52 -04:00
f5b945bf6a ansible-doc: fix typo in output (#83205) 2024-05-06 20:04:21 +00:00
6aa8192131 Multi-arch support for container test (#83196) 2024-05-03 18:15:37 -07:00
3461f1d757 Build test modules for aarch64 (#83195) 2024-05-03 17:42:59 -07:00
2816922cd6 display: fix log verbosity (#83179)
* display, ensure we have a logger before we log
2024-05-03 10:38:41 -04:00
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>
2024-05-02 21:37:19 +00:00
ad777cba5a package_facts add alias support (#83149)
* package_facts add alias support

fixes #83143

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-05-02 14:33:12 -04:00
dc6b77beca Don't hardcode the dnf module, dynamically select one (#83183) 2024-05-02 12:22:56 -05:00
cd9c4eb5a6 Gather sysinfo facts on s390 (#83157) 2024-05-01 11:10:58 -07:00
585ef6c55e Show examples in role entrypoint argument specs. (#82671) 2024-05-01 11:27:50 -04:00
e3d4c20f6e Correctly treat separate paragraphs in top-level descriptions as separate paragraphs. (#83155) 2024-04-30 17:15:35 +02:00
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
802e95f580 distro: remove pep8 ignore
* Remove unnecessary pep8 from ignore.txt

Fixes: #80840

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-04-25 12:23:01 -07:00
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
c18e755b82 removed extra ansible_managed 2024-04-25 12:11:09 -07:00
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
124d03145c inspect components, ansible_managed templatable (#83053)
* inspect components, ansible_managed templatable

fixes #82322
2024-04-23 12:43:47 -04:00
87bead3dcf setup_rpm_repo/create_repo: "Arch dependent binaries in noarch package" (#83108)
This fixes "Arch dependent binaries in noarch package" error cause by
including files created by make_elf function in noarch packages. While the
error only manifests itself on EL 7 and 8 it is better to use files
suitable for noarch packages to prevent the error potentially
re-occuring in the future.
2024-04-22 09:10:42 +02:00
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
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
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
8c3c694472 test: remove ansible-examples.git repo (#81600)
* test: remove ansible-examples.git repo

* To speed up git tests remove reference to ansible-examples.git

Fixes: #81327

* Make CI green

Signed-off-by: Ansible Test Runner <noreply@example.com>
Co-authored-by: Ansible Test Runner <noreply@example.com>
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2024-04-17 17:15:42 -04:00
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
a3cdd831b3 handlers: fix executing in lockstep using linear (#83030)
Fixes #82307
2024-04-16 17:45:18 +02:00
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
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
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
46137127a2 ansible-config: ensure we get templated default (#82974)
AKA all defaults rendered
2024-04-09 14:57:26 -04:00
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
cd365057d3 Remove more Python 2.x compat code 2024-04-08 12:55:52 -07:00
5187061939 ansible-test - Update base/default containers 2024-04-08 10:09:58 -07:00
61e18572bb Play - remove deprecated ROLE_CACHE in favor of role_cache (#82979) 2024-04-04 23:07:25 +00:00
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
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
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
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
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