summaryrefslogtreecommitdiffstats
path: root/lib (follow)
Commit message (Collapse)AuthorAgeFilesLines
* reserved vars, avoid gather_subset (#84575)HEADdevelBrian Coca5 hours2-10/+8
|
* fix template (#84563)Brian Coca34 hours3-4/+16
| | | | | | also fix gather_subset warning and add some comments/notes --------- Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
* filters/flatten: fix input documentation (#84477)Max Gautier3 days1-2/+3
| | | Flatten input is a list, not a dictionary.
* host_group_vars - remove unnecessary os.path.join cache (#84549)Sloane Hertel3 days1-6/+1
|
* user: Fix homedir permissions when UMASK is unset in /etc/login.defsLee Garrett4 days1-9/+17
| | | | | | | | | | | | | | | 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>
* fix incongruent ansible-vault cli options (#84494)Brian Coca4 days1-2/+3
| | | | | | | | 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>
* get_url: add support for BSD-style digest (#84485)Abhijeet Kasurde4 days1-21/+34
| | | | | | | | * Added support for BSD-style digest file to test checksum of downloaded file. Fixes: #84476 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Allows iptables chain creation with wait parameter (#84491)Kristopher Newsome4 days1-2/+4
| | | | | | | * Allows iptables chain creation with wait parameter Fixes #84490 * Add the changelog fragment for 84490
* User: Update prompt for SSH key passphrase prompt (#84521)Abhijeet Kasurde4 days1-3/+9
| | | | | | | | * update prompt for SSH key passphrase prompt * introduce timeout in SSH key passphrase interaction Fixes: #84484 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* fix[doc.py]: path will be undefined (#84464)Harilou4 days1-1/+2
| | | | | | | | | | | | | | | * 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>
* `with_dict` type error include value in error message (#84473)simonLeary424 days1-1/+1
| | | | | | | | | | | | | | | | | * 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>
* host_group_vars - fix Python API traceback caused by undefined 'key' ↵xzeck5 days1-9/+7
| | | | | | | | | | | | | | | | | | | 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
* fix warnings about reserved variable names to cover all sources (#84432)Brian Coca8 days4-7/+17
| | | | | | | 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
* constructed, let users know some limitations (#84510)Brian Coca8 days1-0/+4
| | | | | | | | | | | | | | | | | * 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>
* FIX get_options function for CallbackBase (#84496)simonLeary4210 days2-2/+5
|
* Add Keycloak service account auth capability to ansible-galaxy (#83145)Matt Martz11 days3-21/+37
|
* Added docstrings to V2 methods in the CallbackBase Class (4 & 5 of 27) (#83507)Rob Garcia2024-12-301-27/+51
| | | | | | | | | | | | | | | | | * Added docstrings to V2 methods in the CallbackBase Class (4 & 5 of 27) * Made corrections as requested by webknjaz. * Cleaned up whitespace issues. * Corrections to customization note for review by webknjaz. * Added rtype to return in docstrings. * Simplified docstrings. Co-authored-by: Brian Coca <bcoca@users.noreply.github.com> Co-authored-by: Sviatoslav Sydorenko <webknjaz@redhat.com>
* Add documentation for non-numeric cron scheduling values (#84396)M Norrby2024-12-171-3/+9
| | | | - Document vixie cron compatible non-numeric values - State which parameters cannot be used together with special_time
* gather_facts, fix 'smart' handling with network os and 'setup' (#84425)Brian Coca2024-12-171-5/+30
| | | | | | | gather_facts, fix network_os and smart logic and defaults setup will be default for smart only if network_os is not set, now you get warnings and errors when missing a valid facts module for a network os Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
* uri: move follow_redirects to module_utils (#84442)Abhijeet Kasurde2024-12-104-21/+38
| | | | | | * url lookup and uri module shares follow_redirects parameter, moving it module_utils code. Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* adding option for form-multipart data to switch multipart encoding (#80566)David Lassig2024-12-102-2/+22
| | | | | | | * adding option for form-multipart data to switch multipart encoding from default base64 to 7or8bit encoding Co-authored-by: davlas <david.lassig@bwi.de> Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com> Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
* Added None/empty notes to regex_search (#84437)Brian Coca2024-12-101-1/+4
|
* Make sure we are always using Lock from our multiprocessing context (#84453)Matt Martz2024-12-102-5/+6
| | | | | * Make sure we are always using Lock from our multiprocessing context * add clog frag
* Fix a debug message error (#84426)spyinx2024-12-101-1/+1
|
* copy, prevent internal options in task (#84422)Brian Coca2024-12-101-1/+6
| | | | | * copy, prevent internal options in task fixes #84367
* simplify copy module (#84313)Sloane Hertel2024-12-101-130/+45
| | | | | * simplify redundancy with AnsibleModule set_*_if_different methods * simplify copying a source directory to a dest directory without modifying behavior
* csvfile - let the config system do the typecasting (#82263)Herman van Rink2024-12-061-2/+3
| | | Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* lookup_template: added trim_blocks option (#84254)Abhijeet Kasurde2024-12-061-6/+20
| | | | | | | | | * Allow user to control the trimming of blocks while templating * Added tests * Updated documentation and example Fixes: #75962 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* unarchive: Clamp zip timestamps on 32-bit time_t (#84409)Stefano Rivera2024-12-051-0/+22
| | | | | | | | | | | | Clamp zip timestamps to representible values when unpacking zip files on platforms that use 32-bit time_t (e.g. Debian i386). This is a non-issue in practice (in 2024), but should allow the test suite to pass on Debian i386. We use a round value of 2038-01-01 00:00:00 for simplicity, and to avoid running into timezone offsets closer to the actual limit. MR #81520 introduced sanity-checking tests that used dates not representable with a 32-bit time_t.
* fix reset_connection with templated connection variables (#84240)Alex Willmer2024-12-053-14/+25
| | | | | | | | | * ssh: Test reset_connection with templated ansible_ssh_executable Add failing test to confirm subsequent fixes are necessary & sufficient. * ssh: Fix reset_connection with templated ansible_ssh_executable Signed-off-by: Alex Willmer <alex@moreati.org.uk>
* Fix `failed_when` string in the second `ansible.builtin.uri` example (#84382)Fil2024-12-051-1/+1
| | | | | | | Open the double quotes at the beginning of the entire `failed_when` value. Individual conditions work well, yet fail each time they are combined with a logic `or` (as per the example). Double quoting the entire string solved the problem.
* wait_for_connection: fix errant warning for local connection(s) (#84421)Alex Willmer2024-12-051-0/+3
| | | | | | | | | | This prevents "[WARNING]: Reset is not implemented for this connection" when using wait_for_connection with localhost or other local hosts. It's arguable (from a consistency/correctness perspective) that `ansible.plugins.connection.local.Connection.reset()` should call `Connection.close()`. I went for a no-op on the basis of "if it aint broke don't fix it", and erred on the side of keeping existing semantics. However either option would be fine with me.
* document decrypt also works on strings (#84412)Brian Coca2024-12-051-1/+1
|
* config lookup, fixes and tests (#84398)Abhijeet Kasurde2024-12-051-20/+11
| | | | | * Integration tests for lookup_config Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Coverage for virtual/sunos.py (#84357)Abhijeet Kasurde2024-12-031-15/+3
| | | Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* test coverage for virtual/sysctl.py (#84356)Abhijeet Kasurde2024-12-031-16/+3
| | | | | * test coverage for virtual/sysctl.py Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Changed human_to_bytes input to a string (#84336)Sammy Hori2024-12-031-1/+1
| | | For it to be a human readable description it can't be an int.
* Added examples for password_hash (#84322)Abhijeet Kasurde2024-12-031-0/+8
| | | | | Fixes: #84318 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* fix documentation about avoiding apt_key (#84326)Lorenzo Bettini2024-12-031-1/+1
|
* Add ansible_uptime_seconds support for AIX (#84321)Tobi2024-12-031-0/+34
| | | | | Added ansible_uptime_seconds fact for AIX Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
* Removed deprecated include_delegate_to param (#84306)Abhijeet Kasurde2024-12-031-6/+1
| | | | | | | | | | | | * Removed deprecated include_delegate_to param * Remove deprecated include_delegate_to param from get_vars API in manager.py Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> * Make ignore.txt Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* package_facts: extend note about python3-rpm to cover Fedora 41+ (#84373)Adam Williamson2024-11-291-1/+1
| | | | | | | | Fedora 41 no longer has python3-rpm installed by default either, so package_facts blows up on Fedora 41 hosts unless you make sure python3-rpm is installed first. Not sure we can do a lot about this besides extending this note. Signed-off-by: Adam Williamson <awilliam@redhat.com>
* dnf5,apt: add auto_install_module_deps option (#84292)Martin Krizek2024-11-212-51/+91
| | | | | * dnf5,apt: add auto_install_module_deps option Fixes #84206
* dnf5 - consolidate package resolving settings (#84335)Martin Krizek2024-11-191-8/+17
| | | Fixes #84334
* dnf5: fix is_installed check (#84275)Martin Krizek2024-11-191-0/+9
| | | Fixes #84259
* include_vars - fix including new hash variables when hash_behaviour is set ↵Sloane Hertel2024-11-141-3/+2
| | | | to merge (#84303)
* Sequence query fix (#83758)James Ramsaran2024-11-141-7/+17
| | | | Co-authored-by: flowerysong <junk+github@flowerysong.com>
* vars/varnames more examles more varied (#84300)Brian Coca2024-11-122-7/+20
| | | also ref each other in seealso as they will commonly be used toghether
* Deprecated libvirt_lxc_noseclabel config (#84287)Abhijeet Kasurde2024-11-121-1/+4
| | | | | | | | | | | | | | | * Deprecated libvirt_lxc_noseclabel config * deprecate moved libvirt_lxc_noseclabel config Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> * Make CI green I Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> --------- Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* package_facts fix empty packages on foreign mgr (#83855)Brian Coca2024-11-121-3/+15
| | | | | | | * package_facts fix empty packages on foreign mgr return the first package manager that provides output add tests with fake rpm on apt machines