summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* New release v2.10.8v2.10.8Rick Elrod2021-04-121-1/+1
|
* Update Ansible release version to v2.10.8rc1.post0.Rick Elrod2021-04-051-1/+1
|
* New release v2.10.8rc1v2.10.8rc1Rick Elrod2021-04-051-1/+1
|
* Nonfatal facts (#73804) (#73830)Brian Coca2021-04-051-19/+31
| | | | | | | | | | continue with local facts vs at script error actually capture execution errors better error messages in general add more local facts tests fixes #52427 (cherry picked from commit 9db557e43114e6f26d39ab3537ad301b02334d22)
* find - set proper default based on use_regex (#73961) (#73965)Brian Coca2021-04-051-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using "use_regex: yes" and setting an excludes: without specifying a pattern: the existing code passes the file-glob '*' to the regex matcher. This results in an internal invalid-regex exception being thrown. This maintains the old semantics of a default match-all for pattern: but switches the default to '.*' when use_regex is specified. The code made sense as-is before excludes: was added (2.5). In that case, it made no sense to set use_regex but *not* set a pattern. However, with excludes: it now makes sense to only want to exclude a given regex but not specify a specific matching pattern. Closes: #50067 * moved change to new location added changelog * Update lib/ansible/modules/find.py Co-authored-by: Ian Wienand <iwienand@redhat.com> (cherry picked from commit 089d0a0508a470799d099d95fc371e66756a00b3) * Fix up bad rebase, nuke duplicate "elements:" lines Signed-off-by: Rick Elrod <rick@elrod.me> Co-authored-by: Rick Elrod <rick@elrod.me> Co-authored-by: Brian Coca <bcoca@users.noreply.github.com> Co-authored-by: Sam Doran <sdoran@redhat.com>
* Fix setup subset (#74022) (#74047)Brian Coca2021-04-051-10/+13
| | | | | | | | | | | * fix error msg on bad subset * added test * handle more raised but not handled fact exceptions (cherry picked from commit 4a82e2c4860b88aa2d5ab2fd1f7cd79636005b5f) * Update fix_setup_bad_subset.yml Co-authored-by: Rick Elrod <rick@elrod.me>
* Fix debug factsetter (#74067) (#74084)Brian Coca2021-04-052-3/+3
| | | | | | | | | | | | * Fix debug factsetter (#74067) * prevent debug from setting namespaced facts as tlv * also added tests (cherry picked from commit f9f839fa08eee46ad7a86d6cbc7519541a50c7ef) * Update debug_dont_set_facts.yml Co-authored-by: Rick Elrod <rick@elrod.me>
* fix su localization option [2.10] (#73878)Brian Coca2021-04-051-0/+1
| | | | | | | | | | | * fix su localization optoin fixes #73837 (cherry picked from commit 37cb55018516c3efacab37e1f65da1e8bb7550e5) * Update su_fix.yml Co-authored-by: Rick Elrod <rick@elrod.me>
* module output is only json objects (#73765) (#73777)Brian Coca2021-04-043-9/+5
| | | | | | remove json lists as they are not valid from modules fixes #73744 (cherry picked from commit 43300e22798e4c9bd8ec2e321d28c5e8d2018aeb)
* add optional module_utils import support (#73832) (#73918)Matt Davis2021-04-041-15/+55
| | | | | | | Treat core and collections module_utils imports nested within any Python block statement (eg, `try`, `if`) as optional. This allows Ansible modules to implement runtime fallback behavior for missing module_utils (eg from a newer version of ansible-core), where previously, the module payload builder would always fail when unable to locate a module_util (regardless of any runtime behavior the module may implement). * sanity test fixes (cherry picked from commit 3e1f6484d77f2d7546952cfa22a8534d74ed3dc6)
* Fix a bug adding unrelated candidates to the plugin loader redirect_list ↵Sloane Hertel2021-04-041-1/+11
| | | | | | | | | | | | | | | (#73863) (#73958) * Add tests for the redirect list * test redirect list for builtin module * test redirect list for redirected builtin module * test redirect list for collection module * test redirect list for redirected collection module * test redirect list for legacy module * changelog (cherry picked from commit 48c0fbd1cb92943b992b8a522e40ae6fe668e648)
* [stable-2.10] Ensure task from the worker is finalized/squashed (#73881) ↵Matt Martz2021-04-041-0/+7
| | | | | | | | (#73928) * Ensure task from the worker is finalized/squashed. Fixes #57399. Fixes #49942 (cherry picked from commit 832631b) Co-authored-by: Matt Martz <matt@sivel.net>
* [stable-2.10] find: Specify elements type in paths (#70139) (#73970)Sam Doran2021-04-041-3/+7
| | | | | | | | Fixes: #35990 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> (cherry picked from commit 87406890cf82d24ea78509e55bf94f2cf801dc6a) Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
* Fix wrong backup directory var name in apt module (#73840) (#74002)Xabier Napal2021-04-041-1/+1
| | | (cherry picked from commit 2bff120db6bf96dd0085c6ce1b29f3999b872db4)
* Update Ansible release version to v2.10.7.post0.Rick Elrod2021-03-151-1/+1
|
* New release v2.10.7v2.10.7Rick Elrod2021-03-151-1/+1
|
* Update Ansible release version to v2.10.7rc1.post0.Rick Elrod2021-03-091-1/+1
|
* New release v2.10.7rc1v2.10.7rc1Rick Elrod2021-03-081-1/+1
|
* Don't fail for mixed typed keys (#73726) (#73776)Brian Coca2021-03-081-1/+5
| | | | | | | but warn that content cound not be sorted because of this * added tests (cherry picked from commit 527bff6b79081b942c0ac9d0b1e306b99ffa81a6)
* move firewalld to ansible.posix (#70692) (#73689)Bruno Travouillon2021-03-081-1/+1
| | | | | | | | | | | * move firewalld to ansible.posix (#70692) Signed-off-by: Adam Miller <admiller@redhat.com> (cherry picked from commit b479adddce8fe46a2df5469f130cf7b6ad70fdc4) * Update changelogs/fragments/73689-move-firewalld-to-ansible-posix.yaml Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: Adam Miller <admiller@redhat.com>
* [2.10][InventoryManager] Fix two unhandled exceptions (#73798)Abhijeet Kasurde2021-03-081-1/+3
| | | | | | | | | | | | | | | | | | | | | | | Change: - Fix regression: unhandled exception when given inventory directory is empty or contains empty subdirectories. - Fix unhandled exception when limit file is actually a directory instead of a file. - Fix inventory tests which previously could never fail due to missing `set -e`. Fixed up tests that failed after `set -e` was added. Added several tests. Test Plan: - New tests - Fixed existing tests which previously could never fail Tickets: - Fixes #73658 Signed-off-by: Rick Elrod <rick@elrod.me> Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> (cherry picked from commit fa046d302c0e352a8dfaa8d5d364eeca7e815afd) Co-authored-by: Rick Elrod <rick@elrod.me>
* module_utils: ensure find_mount_point consistently returns text (#73625) ↵Brian Coca2021-03-081-6/+6
| | | | | (#73710) (cherry picked from commit dabfee4d5c8ef445bdcb06a8b2ffe5327525a55d)
* [stable-2.10] Normalize ConfigParser between Python2 and Python3 (#73715) ↵Matt Martz2021-03-081-1/+4
| | | | | | | | | | | | | | (#73723) * [stable-2.10] Normalize ConfigParser between Python2 and Python3 (#73715) * Normalize config parser between py2 and py3 * Add tests and changelog * Use different config entry, since we supply certain env vars (cherry picked from commit 950ab74) * Update config entry
* [stable-2.10] hostname - add Almalinux support (#73619) (#73648)Sam Doran2021-03-081-0/+6
| | | | | (cherry picked from commit ac0dedda72) Co-authored-by: Aaron Guise <guisea@users.noreply.github.com>
* galaxy: Handle ignored directory names in role skeleton (#72035) (#73806)Sloane Hertel2021-03-081-1/+3
| | | | | | | | | | | | | | | | * galaxy: restore left hand slicing in assignment Fix 'ansible-galaxy role init --role-skeleton=role-skeleton' when the role skeleton contains an ignored directory. The issue was because the 'dirs' variable was changed to reference a different list, but needs to be mutated instead to stop os.walk from traversing ignored directories. Fixes: #71977 Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com> (cherry picked from commit eb72c36a71c8bf786d575a31246f602ad69cc9c9) Co-authored-by: manas-init <70483021+manas-init@users.noreply.github.com>
* [2.10] find module - stop dir traversal when depth is exceeded (#73808)Sloane Hertel2021-03-081-0/+2
| | | | | | | * find module - stop traversing directories with os.walk when depth is already exceeded (#73718) (cherry picked from commit 8628c12f30693e520b6c7bcb816bbcbbbe0cd5bb) * Update tests since there are fewer prior tasks creating files/directories
* [stable-2.10] Let vault lookup output unicode string. (#73571) (#73573)Alexander Sowitzki2021-03-081-1/+1
| | | | | | | Until now, the lookup plugin returned a byte string. Changed this to output a unicode string instead. (cherry picked from commit d0fda3e9011ece1be85e08835550f5063823f087) Co-authored-by: Alexander Sowitzki <asowitzk@redhat.com>
* only add data when there is data to add (#54559) (#73566)Brian Coca2021-03-082-17/+41
| | | | | | | | | | | | Only add data when there is data to add also avoid clobbering existing data with empty file fixes #45843 * remove redundant code, update comments * fix mock dataloader, original does not return None * added test (cherry picked from commit ec8a5565386f514b34fb2b4969436672dfe5f71d)
* [stable-2.10] Add AlmaLinux to the family of Red Hat-like operating systems ↵Sam Doran2021-03-081-1/+1
| | | | | | | | | | (#73541) (#73543) * Add changelog and fixtures for AlmaLinux support Co-authored-by: Christoph Schug <com+github@schug.net> (cherry picked from commit 2f5c83dfb1) Co-authored-by: Sam Doran <sdoran@redhat.com>
* [stable-2.10] Don't treat host_pinned as lockstep (#73484) (#73504)Matt Martz2021-03-081-2/+2
| | | | | | | | | | | | | | * [stable-2.10] Don't treat host_pinned as lockstep (#73484) * Don't treat host_pinned as lockstep. Fixes #73364 * Add intg tests. (cherry picked from commit d3f3784b86789b7b55782b0af4fba6d6bb935f19) Co-authored-by: Matt Martz <matt@sivel.net> * Make non-lockstep callback tests more deterministic (#73511) (cherry picked from commit 125c220343deb60ad64f4a412e6f670ddb511f4c)
* Update Ansible release version to v2.10.6.post0.Rick Elrod2021-02-181-1/+1
|
* New release v2.10.6v2.10.6Rick Elrod2021-02-171-1/+1
|
* Update Ansible release version to v2.10.6rc1.post0.Rick Elrod2021-02-081-1/+1
|
* New release v2.10.6rc1v2.10.6rc1Rick Elrod2021-02-081-1/+1
|
* [stable-2.10] pause - adjust warning when run in background (#73182) (#73231)Sam Doran2021-02-071-1/+2
| | | | | | | | | | | When the pause module is run in the background and seconds parameter is provided, do not warn. * Add tests * Fix existing tests The test wasn't failing when it should have. (cherry picked from commit 0e6c334115) Co-authored-by: Sam Doran <sdoran@redhat.com>
* bugfix: use to_text(stdout) in psrp.Connection.put_file method (#73491) - ↵Jordan Borean2021-02-071-1/+1
| | | | | | | 2.10 (#73496) (cherry picked from commit f271d02a9fa07299ea4fccbd7554a1bcec1782dc) Co-authored-by: jakegatsby <39974194+jakegatsby@users.noreply.github.com>
* [stable-2.10] Fix YAML error message when error is at the end of the file ↵Sam Doran2021-02-071-0/+14
| | | | | | | | | | | | | | | | | (#73241) (#73296) If a YAML file fails to load due to a syntax error in a file, or there is an error in the last line of a file, PyYAML reports the last line number of the file as the index where the error occurred. When reading the file lines, we use that index to the get the relevant line. If the index value is out of range, the relevant line is lost for error reporting. Subtract one from the index value to avoid the IndexError in this specific scenario. It is possible to still get an IndexError, which will be handled as it is currently. * Update existing tests and add new tests (cherry picked from commit e8d4b62b41) Co-authored-by: Sam Doran <sdoran@redhat.com>
* Use a pty for local connections (#73023) (#73281)Brian Coca2021-02-071-2/+25
| | | | | | Fixes #38696 Co-authored-by: James Cammarata <jimi@sngx.net> (cherry picked from commit 30d93995ddcf92636919c2238435064a8089e240)
* Always mention the name of the deprecated plugin in routing deprecation ↵Felix Fontein2021-02-071-4/+6
| | | | | messages (#73059) (#73237) (cherry picked from commit df9cf368c0bb5ff2f7152402b30a0f27a5571389)
* [stable-2.10] facts - properly report virtualization facts for Linux guests ↵Sam Doran2021-02-071-0/+5
| | | | | | | on bhyve (#73204). (#73233) (cherry picked from commit df451636e74fe6f0021a5555392f84c2bf194432) Co-authored-by: Sam Doran <sdoran@redhat.com>
* fix inventory source parse error handling (#73160) (#73276)Brian Coca2021-02-071-8/+13
| | | | | | | fixes #51025 added test cases (cherry picked from commit 1e27d4052a95d8f19c63d6a37909b3ec690ac832)
* Local vars should have highest precedence in AnsibleJ2Vars (#72830) (#73370)Martin Krizek2021-02-071-22/+14
| | | | | | | | | | | | | | | | | | | | Ability to add local variables into AnsibleJ2Vars was added in 18a9eff11f0a6e51b17405ce596bd9ff7e676320 to fix #6653. Local variables are added using ``AnsibleJ2Vars.add_locals()`` method when creating a new context - typically when including/importing a template with context. For that use case local template variables created using ``set`` should override variables from higher contexts - either from the play or any parent template, or both; Jinja behaves the same way. Also removes AnsibleJ2Vars.extras instance variable which is not used. Also adds missing test for #6653. Fixes #72262 Fixes #72615 ci_complete (cherry picked from commit a2af8432f36ec8cc5368a747f1211d2b9ba01f2e)
* no_log mask suboption fallback values and defaults CVE-2021-20228 (#73487) ↵Jordan Borean2021-02-071-11/+17
| | | | | (#73494) (cherry picked from commit 0cdc410dce6658e93c06fa27e0100ddbb11e7015)
* git: verify, only use --raw when we need it (#70900) (#73473)Rick Elrod2021-02-071-1/+4
| | | | | | | | | | | | | | | Change: - Allow older git to verify tags again - Enable verification tests everywhere, even if most of them only work on newer git. Some of them work on older git and they test the --raw parameter. Test Plan: - Re-enabled subset of git tests Tickets: - Fixes #64469 Signed-off-by: Rick Elrod <rick@elrod.me>
* Fix warning for nonexistent inventory cache (#72840) (#73443)Sloane Hertel2021-02-071-6/+7
| | | | | * Fix inventory cache warning by checking if the key exists before loading it (cherry picked from commit 840bdc1e10f1f0d3c8c0ce4109e9724b466202c0)
* ensure unsafe writes fallback (#70722) (#73144)Brian Coca2021-02-072-11/+10
| | | | | | | | | | | | * Ensure we actually fallback to unsafe_writes when set to true add integration test add fix for get_url not passing the parameter from args (cherry picked from commit 932ba3616067007fd5e449611a34e7e3837fc8ae) * Added clog missing for issue 70722 (#73175) (cherry picked from commit d6670da1d7bc81dccd522d1bc27cc25164ef1aba)
* [stable-2.10] import_playbook - change additional params to deprecation ↵Sam Doran2021-02-072-1/+6
| | | | | | | | | | (#72987) (#73015) I incorrectly recommended this be set as a warning when it should have been a deprecation. * Fix deprecation sanity test to not required a collection name when not inside a collection (cherry picked from commit 8e022ef00a) Co-authored-by: Sam Doooran <sdoran@redhat.com>
* Documentation: fix formatting (#73186)Andrew Klychkov2021-02-0310-106/+110
|
* Update Ansible release version to v2.10.5.post0.Rick Elrod2021-01-181-1/+1
|
* New release v2.10.5v2.10.5Rick Elrod2021-01-181-1/+1
|