Commit Graph

6845 Commits (devel)

Author SHA1 Message Date
Matt Clay 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
4 hours ago
Sloane Hertel 65638b4d01
remove old install info when installing collections (#83194)
* Fix cleaning up galaxy server info from previous installations

* changelog
5 days 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>
1 week ago
Martin Krizek 3c280e6c1b
dnf5: implement enable_plugin and disable_plugin options (#83105)
80cfea9c25
2 weeks ago
Martin Krizek 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
2 weeks ago
Abhijeet Kasurde 57a8eca3af
pymarkdown: update docs (#83150)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2 weeks ago
flowerysong f5b945bf6a
ansible-doc: fix typo in output (#83205) 2 weeks ago
Matt Clay 6aa8192131
Multi-arch support for container test (#83196) 2 weeks ago
Matt Clay 3461f1d757
Build test modules for aarch64 (#83195) 2 weeks ago
Brian Coca 2816922cd6
display: fix log verbosity (#83179)
* display, ensure we have a logger before we log
2 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>
2 weeks ago
Brian Coca ad777cba5a
package_facts add alias support (#83149)
* package_facts add alias support

fixes #83143

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2 weeks ago
Matt Martz dc6b77beca
Don't hardcode the dnf module, dynamically select one (#83183) 2 weeks ago
Felix Fontein 585ef6c55e
Show examples in role entrypoint argument specs. (#82671) 3 weeks ago
Felix Fontein e3d4c20f6e
Correctly treat separate paragraphs in top-level descriptions as separate paragraphs. (#83155) 3 weeks ago
Brian Coca c18e755b82 removed extra ansible_managed 3 weeks ago
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
4 weeks ago
Brian Coca 124d03145c
inspect components, ansible_managed templatable (#83053)
* inspect components, ansible_managed templatable

fixes #82322
4 weeks ago
Martin Krizek 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.
4 weeks 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 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>
1 month ago
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>
1 month ago
Abhijeet Kasurde 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>
1 month ago
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)
1 month ago
Martin Krizek a3cdd831b3
handlers: fix executing in lockstep using linear (#83030)
Fixes #82307
1 month ago
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>
1 month ago
Brian Coca 46137127a2
ansible-config: ensure we get templated default (#82974)
AKA all defaults rendered
1 month ago
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.
2 months ago
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>
2 months ago
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.
2 months ago
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>
2 months ago
Sloane Hertel 4bddbe69d5
Fix traceback inheriting from NetworkConnectionBase and add integration tests (#82954)
Co-authored-by: Jeroen van Bemmel <jvb127@gmail.com>
2 months ago
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>
2 months ago
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
2 months ago
Sloane Hertel b639bd1fd4
Allow "role_name : " prefix for notifying handler listen topics (#82854)
* Allow role name prefix for handler task listen topics

For example,

- name: handler name
  debug:
  listen: topic1

can be notified using `topic1`, `role : topic1` if the handler is in a
standalone or collection role, and `ns.col.role: topic1` if the role is
in a collection, the same way handler names work.

changelog

* fix changelog and tests
2 months ago
snipfoo 5f4e332e37
Fix condition for unquoting configuration strings from ini files (#82388)
* Add prefix to `origin` when configuration variables come from ini files

Fixes ansible#82387

This change was suggested by @bcoca in
https://github.com/ansible/ansible/pull/82388#discussion_r1424235728 and
https://github.com/ansible/ansible/pull/82388#discussion_r1424249732

When configuration variables come from an ini file, their `origin` is
now set to `ini: <file>`. Similarly, once supported, YAML configuration
files will have their `origin` as `yaml: <file>`.

Consequently, since unquoting configuration strings should happen if and
only if they come from an ini file, this condition boils down to testing
whether their `origin` starts with `ini:`.

* Do not add prefix to `origin` but explicitly pass `origin_ftype`

So as not to rely on a specific format of the `origin` string,
as suggested by @sivel in
https://github.com/ansible/ansible/pull/82388#issuecomment-1881714871
2 months ago
Abhijeet Kasurde d86ad77d6f
Remove deprecated scp_if_ssh from SSH connection plugin (#82072)
* removed deprecated scp_if_ssh feature from SSH connection
  plugin

Fixes: #81715

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2 months ago
Brian Coca ad0ec47fe9
first_found lookup; minor fixes (#82836)
Always process options no matter the combination
return a full normalized path (symlinks still not followed, should be specific option in future)
2 months ago
Felix Fontein c0821346fc
Do not mangle plugin names in collections that start with an underscore. (#82574) 2 months ago
Felix Fontein 11d69e065f
ansible-doc: restore role attributes (#82678)
* Restore role attributes.

* Add a deprecation warning for role argument specs containing attributes

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: s-hertel <19572925+s-hertel@users.noreply.github.com>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
2 months ago
Matt Clay 31bbc8334e Update container test cgroup handling
When the host uses cgroup v2 and does not use systemd,
skip container scenarios which are unsupported.
2 months ago
Matt Clay a192193c55 Limit Alpine 3.18 test hacks to that version 2 months ago
Brian Coca ddae41759c
Add FreeBSD 13.3 and 14.0 to ansible-test (#82530)
Co-authored-by: Matt Clay <matt@mystile.com>
2 months ago
Matt Clay 2b1a5dd7a0 Remove outdated constraint for paramiko setup 2 months ago
Felix Fontein e659c23bf2
blockinfile: do not crash when filename has no path (#81638)
* Do not crash when filename has no path.

* Clean up file after test.
2 months ago
Felix Fontein 0c9f1989a7 Do not treat leading underscore in plugin names as attempted deprecation. 2 months ago
Jordan Borean 8aecd1f9b2
winrm - Handle task timeout (#82784)
When using winrm over HTTP with message encryption enabled and a task
has timed out the connection plugin will fail to cleanup the WinRM
command. This will change that exception into a warning as a timeout is
already an exception event and a failure to clean the operation should
not override the timeout error shown.
2 months ago
Jordan Borean c9086061ca
Allow check mode async task disabling check_mode (#82827)
* Allow check mode async task disabling check_mode

Allows running an async task with check_mode: False when the playbook is
being run in check mode.

* Add check_mode attribute to internal cleanup task
2 months ago
Abhijeet Kasurde 56fa630e47
apt: Install recommended packages while installing deb files (#82805)
* install recommended packages while installing deb files and
  install_recommends is set to true.

Fixes: #29726

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
2 months ago