* Start of tests for modify_module, specifically to ensure proper shebang replacement on old style modules (#36602)
(cherry picked from commit a7062b7587)
* Modify test to work on 2.4 due to lacking templar kwarg
* Bug in del(list) logic. Say you have a list of 4 elements a[0-3]
and you have to remove index 1 and 3, if you remove index 1 first
then list is cut short a[0-2] and does not have index 3
Fix: Remove indexes in reverse sorted order e.g. 3 and 1 in above
example so that order of indexes remain preserved even after deleting
fix is to remove indexes in reverse sorted order
* Add test cases for failed case
(cherry picked from commit 0bbea9a579)
* Fix types when evaluating interpreter. Fixes#36536
* Rename variables that contain bytes to b_*
* Get rid of to_text() and to_bytes() calls that do nothing (because the
data is already the proper type)
(cherry picked from commit a4df4d33ac)
* Add example on how to use a here document with shell module
* Remove here doc example and add note to use script module instead
(cherry picked from commit 5e7ee9df0a)
* Re-use logic from StrategyBase._load_included_file in StrategyModule.run for free and linear (#36470)
This improves include_role performance and recursion limits
(cherry picked from commit 10fefc7156)
* Add changelog for 36470
This fixes implementation of extra config for virtual machine.
Fixes: #32004
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 80fb836ce5)
* added support for --testcase flag in ansible-test
* fixed command format
* added tab completion
* fixed sanity issues
* added documenation for --testcase
* don't autocomplete when multiple modules are selected
(cherry picked from commit 3f5caf659e)
* fix new EC2 C5 instance virtualization_type identification
Fixes#35051
Signed-off-by: Adam Miller <admiller@redhat.com>
(cherry picked from commit f95adcce8e)
The error message as it was confused me when the value was 'enabled' and
there was also a module parameter named 'enabled'.
enabled is not a valid boolean. Valid booleans include: yes, on, 1, true, ...
So by clearly describing it as a value, the confusion would have been
avoided.
The value 'enabled' is not a valid boolean. Valid booleans include: yes, on, 1, true, ...
(cherry picked from commit 487cf0ee8d)
This was causing an exception in the TaskQueueManager when a third
party handler plugin was processed that inherited or explicitly
called the callback method from super because the method signature
was incorrect in callback/__init__ and it processed the arguments as
incorrect data types as a side effect.
Signed-off-by: Adam Miller <admiller@redhat.com>
(cherry picked from commit dd9b2c0774)
ansible-console was calling setup_vault_secrets
twice. Once directly and once via _play_prereqs()
The direct invocation was not setting auto_prompt=False.
However, the direct invocation isn't need at all so
this removes it so only _play_reqs() is used.
That fixes the unrequested vault password
prompting.
Fixes#33027
(cherry picked from commit 810fa7046b)
* Exclude parent when copying included task to avoid memory issues. Fixes#35796
* Simplify implicit block squashing to pre-group, instead of post re-parenting
(cherry picked from commit 7d1eb88ecf)
* Insert lines before or after when the regexp exists elsewhere in the file
* Correct filter syntax in lineinfile integration test
* Use multi-line YAML syntax on lineinfile tests
Unify indentation
* Add lineinfile tests for same line matched to different regexps
* Remove debug statement from test
(cherry picked from commit f8f2b6d61d)