mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Enforce the _raw_params variable with include_role (#26430)
Currently, when using this test, it fails with the following error message: > AttributeError: 'NoneType' object has no attribute 'rfind' This is because there is no _raw_params value for parent_include.args here https://github.com/ansible/ansible/blob/devel/lib/ansible/playbook/included_file.py#L104 This commit ensure the value is specified so it can be reused and hence not fail at this specific line.
This commit is contained in:
committed by
John R Barker
parent
95a0fe37da
commit
05477412ba
@@ -18,6 +18,7 @@
|
||||
- block:
|
||||
- include_role:
|
||||
name: openvswitch_db
|
||||
_raw_params: openvswitch_db
|
||||
when: "limit_to in ['*', 'openvswitch_db']"
|
||||
rescue:
|
||||
- set_fact: test_failed=true
|
||||
@@ -27,4 +28,4 @@
|
||||
- name: Has any previous test failed?
|
||||
fail:
|
||||
msg: "One or more tests failed, check log for details"
|
||||
when: test_failed
|
||||
when: test_failed
|
||||
|
||||
Reference in New Issue
Block a user