Commit Graph
55091 Commits
Author SHA1 Message Date
Sloane HertelandGitHub 333ee8d010 Test include_vars reserved variable matching (#84678)
* Add test case for include_vars

* Revise test to catch erroneous warnings
2025-02-07 16:15:59 -05:00
🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко)andGitHub ee49adfaf4 🧪🔥 Delete the egg-info integration test (#84686)
Previously, the integration test depended on luck. `setuptools` used
to be bundled in Python stdlib's `ensurepip`. Python 3.12 and newer no
longer include it. This test imports `pkg_resources` that is a part of
`setuptools`, meaning that it'll run out of luck at some point, under
newer Python runtimes.

This test does not seem to be useful to us so instead of fixing it, we
remove it from the repo [[1]].

Supersedes #84681.

[1]: https://github.com/ansible/ansible/pull/84681#discussion_r1945525317
2025-02-07 19:43:29 +01:00
Sammy HoriandGitHub 6724e076dd Fix 1GB example in human_to_bytes.yml
Fixed an incorrect example, where the expected output given had evidently been copied from an earlier example accidentally.

PR #84684
2025-02-07 18:30:23 +01:00
Matt ClayandGitHub f3ccd78cce ansible-test - Update base/default containers (#84670) 2025-02-05 02:09:06 +00:00
Matt ClayandGitHub cd881bf71e ansible-test - Add pytest-mock to mypy sanity test (#84669) 2025-02-05 00:58:48 +00:00
Matt ClayandGitHub 7594243fc0 ansible-test - Update sanity test requirements (#84667) 2025-02-04 15:03:34 -08:00
Matt ClayandGitHub 21bc1d915d ansible-test - Fix warning message grammar (#84666) 2025-02-04 19:58:21 +00:00
Matt ClayandGitHub 4b38456e4f ansible-test - Correct CLI arg type and annotation (#84664) 2025-02-04 17:53:14 +00:00
Matt ClayandGitHub 4cc47307ef Use separate venvs for each release command (#84641)
This avoids requirements conflicts between different commands invoked by the release tool.
2025-01-30 08:31:36 -08:00
Matt DavisandGitHub a6b5861c53 add lightweight core issue template for bot-ignored issues (#84638) 2025-01-29 18:18:48 -08:00
Dominique QuatravauxandGitHub 48d71ba3aa [fix] warn_if_reserved expects a list (#84624)
Fixes #84623
2025-01-28 18:46:10 +00:00
Abhijeet KasurdeandGitHub 8290912eb1 service_facts: skip unwanted lines in openrc output (#84622)
* rc-status commands returns unwanted lines with service names
  and their status. Skip such lines while parsing service names

Fixes: #84512

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-01-28 16:19:46 +01:00
Abhijeet KasurdeandGitHub 6db6d1967e connection: raise exception return by SSH (#84592)
Fixes: #58133

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-01-28 16:05:37 +01:00
Matt ClayandGitHub ce392dd86e Revert "generator: add support for extra vars usage (#84544)" (#84619)
This reverts commit 186c716af1.
2025-01-27 17:59:29 -08:00
Abhijeet KasurdeandGitHub e6adddcaf8 debug: hide loop variables while using var (#84597)
Fixes: #65856

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-01-23 15:00:32 -08:00
Abhijeet KasurdeandGitHub 03d6209862 apt_key: fix module names in docs (#84588)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-01-22 08:46:04 -06:00
Abhijeet KasurdeandGitHub c9097f73a2 uri: Handle HTTP exception raised (#84015)
* Handle HTTP exceptions raised when reading the content
  such as IncompleteRead

Fixes: #83794

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-01-21 21:39:28 +00:00
Abhijeet KasurdeandGitHub 186c716af1 generator: add support for extra vars usage (#84544)
* generator: add support for extra vars usage

Fixes: #83270

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* CI green

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* Review requests

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* Review requests II

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

---------

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-01-21 15:20:51 -05:00
4953fc7b26 Apt key bye (#84555)
* apt-key module updates due to debian removal

Still kept for now for backwards compat, but removing from testing when not present
And adding more explicit mesasges to errors to point to new module

* added docs and error msg

* clog

* aslkdfj

* no docs to document doc changes

* also add warning to apt_repository

* clog on apt_repo too

* fix string concat

* Apply suggestions from code review

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

---------

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-01-21 14:45:38 -05:00
Abhijeet KasurdeandGitHub 689c047e3a Update win_dirname and win_basename docs (#84587)
* Updated docs and examples for win_dirname and win_basename for UNC path

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-01-21 09:57:14 -08:00
Abhijeet KasurdeandGitHub b51ec9412e cache: deprecated API first_order_merge (#84568)
* deprecated legacy method first_order_merge

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-01-21 09:33:22 -08:00
Brian CocaandGitHub df7e1befb4 stdout callback first comment (#84533)
so we know its a rule, not just implementation accident
2025-01-21 11:02:03 -05:00
Martin KrizekandGitHub 3b6d086f5e targets/handlers: fix incorrect test cmd (#84567) 2025-01-21 10:38:03 -05:00
Jordan BoreanandGitHub 8c5e33cd3a Ansible.Basic - Fix required_if check (#84562)
Fixes the Ansible.Basic `required_if` check when the option to check is
either unset or explicitly set to null.
2025-01-21 05:00:03 +10:00
Jordan BoreanandGitHub f86c58e2d2 ssh - Improve CLIXML stderr parsing (#84569)
Improves the logic for parsing CLIXML values in the stderr returned by
SSH. This fixes encoding problems by having a fallback in case the
output is not valid UTF-8. It also can now extract embedded CLIXML
sequences in all of stderr rather than just at the start.
2025-01-21 04:42:12 +10:00
Brian CocaandGitHub 3398c102b5 reserved vars, avoid gather_subset (#84575) 2025-01-17 21:33:25 -05:00
675d7201d8 fix template (#84563)
also fix gather_subset warning and add some comments/notes
---------

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-01-16 16:33:43 -05:00
Max GautierandGitHub 35a712588e filters/flatten: fix input documentation (#84477)
Flatten input is a list, not a dictionary.
2025-01-15 14:26:29 -05:00
Sloane HertelandGitHub ad93b96750 host_group_vars - remove unnecessary os.path.join cache (#84549) 2025-01-14 14:55:33 -05:00
3030c79331 user: Fix homedir permissions when UMASK is unset in /etc/login.defs
When a user doesn't exist and user module is used to create the user and the
homedir, adduser is called which parses HOME_MODE from /etc/login.defs, and when
not set calculates the mode from UMASK from the same file.

When a user already exists without homedir, and the user module is used to add a
home dir, it incorrectly ignores HOME_MODE, resulting in a world-readable home
dir when UMASK is not set. This is for example the case in Debian trixie and
later, and likely Ubuntu 25.04 and later.


Signed-off-by: Lee Garrett <lgarrett@rocketjump.eu>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-01-14 11:44:16 -08:00
Matt ClayandGitHub 5623a386c1 Fix unit and integration tests (#84554)
This is a follow-up to https://github.com/ansible/ansible/pull/84473
2025-01-14 09:27:39 -08:00
Matt ClayandGitHub 7677bf1c9b ansible-test - Use urllib intead of curl (#84551)
Also added automatic retries on HTTP request exceptions, since all currently implemented methods (GET/PUT/DELETE) are idempotent.
2025-01-14 08:59:42 -08:00
a046ef5a95 fix incongruent ansible-vault cli options (#84494)
prompt now only errors if stdin is specifically triggered and not due to lack of other args

fixes #84489
---------

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2025-01-14 10:46:52 -05:00
73180c0630 ansible-vault integration test fix (fixes: #83837) (#84486)
Correct the test that expects an error when using ansible-vault to write against
a non-writeable dir. Skip the test as root, as root can always write.

Co-authored-by: Lee Garrett <lgarrett@rocketjump.eu>
2025-01-14 15:46:31 +00:00
Abhijeet KasurdeandGitHub 5b0d170496 get_url: add support for BSD-style digest (#84485)
* Added support for BSD-style digest file to test
  checksum of downloaded file.

Fixes: #84476

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-01-14 15:44:29 +00:00
Kristopher NewsomeandGitHub f727d74fc2 Allows iptables chain creation with wait parameter (#84491)
* Allows iptables chain creation with wait parameter

Fixes #84490

* Add the changelog fragment for 84490
2025-01-14 10:43:08 -05:00
Abhijeet KasurdeandGitHub 8588401387 User: Update prompt for SSH key passphrase prompt (#84521)
* update prompt for SSH key passphrase prompt
* introduce timeout in SSH key passphrase interaction

Fixes: #84484

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-01-14 10:35:31 -05:00
d79b706c06 fix[doc.py]: path will be undefined (#84464)
* fix[doc.py]: path will be undefined and a direct reference will throw an UnboundLocalError.

If none of the files in files exists, path will be undefined and a direct reference will throw an UnboundLocalError.
Repair function file parameter type annotation is inaccurate

* Update changelogs/fragments/fix-cli-doc-path_undefined.yaml

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>

---------

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2025-01-14 15:33:43 +00:00
e151cd765d with_dict type error include value in error message (#84473)
* with_dict better error message

* include type in error message

* changelog fragment

* Update lib/ansible/plugins/lookup/dict.py

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

* specific wording

---------

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-01-14 10:21:56 -05:00
Martin KrizekandGitHub 4c30e8b6cf .github: simplify PR templates (#84536)
It is rare that we need to provide information like "before and after
the change". In majority of cases we just ignore "Additional
information" when submitting PRs. We can just put the needed information
into the summary if needed and remove the section from the template,
simplifying it.
2025-01-14 15:04:43 +01:00
Felix FonteinandGitHub ae55f874a0 Enforce FQCNs in seealso plugin/module entries. (#84325) 2025-01-13 17:24:09 -05:00
Abhijeet KasurdeandGitHub 508c4dc93e Update ticketing stubs (#84535)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-01-13 12:04:50 -08:00
Felix FonteinandGitHub 60e2135c2b Bump acme test container to 2.3.0 (#84547) 2025-01-13 11:24:56 -08:00
xzeckandGitHub 40d364985d host_group_vars - fix Python API traceback caused by undefined 'key' variable (#84488)
Fixes:

Traceback (most recent call last):
  File "/home/shertel/ansible/lib/ansible/plugins/vars/host_group_vars.py", line 139, in get_vars
    FOUND[key] = found_files = loader.find_vars_files(opath, entity_name)
          ^^^
UnboundLocalError: cannot access local variable 'key' where it is not associated with a value

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/shertel/ansible/lib/ansible/plugins/vars/host_group_vars.py", line 151, in get_vars
    raise AnsibleParserError(to_native(e))
ansible.errors.AnsibleParserError: cannot access local variable 'key' where it is not associated with a value
2025-01-13 11:51:49 -05:00
Matt ClayandGitHub eb475e23f7 ansible-test - Update utility containers (#84545) 2025-01-11 01:09:48 +00:00
Brian CocaandGitHub 20baf29a2a fix warnings about reserved variable names to cover all sources (#84432)
Also remove redundant check from tqm
Now covers module output (set_fact/include_vars)
Includes play objects at any stage (tasks that error were not covered)
Added tests, moved them to role structure
2025-01-10 18:03:18 +00:00
Matt ClayandGitHub 96f7090acc Use ECR Public for container test (#84537) 2025-01-09 21:16:01 -08:00
477433c5ba constructed, let users know some limitations (#84510)
* constructed, let users know some limitations

reasons https://forum.ansible.com/t/debugging-constructed-inventory-constructing-group-from-values-of-host-variables/39443

* fix indent

* Update lib/ansible/plugins/doc_fragments/constructed.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* updated as per fb

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-01-09 16:18:23 -05:00
simonLeary42andGitHub 64cbb71e6e FIX get_options function for CallbackBase (#84496) 2025-01-08 11:26:42 -05:00
ed250ecd0a 📝 Update the outdated WGs+community links in GH issues (#84523)
Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2025-01-08 13:07:04 +00:00