mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02: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:
parent
95a0fe37da
commit
05477412ba
1 changed files with 2 additions and 1 deletions
|
@ -18,6 +18,7 @@
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: openvswitch_db
|
name: openvswitch_db
|
||||||
|
_raw_params: openvswitch_db
|
||||||
when: "limit_to in ['*', 'openvswitch_db']"
|
when: "limit_to in ['*', 'openvswitch_db']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact: test_failed=true
|
||||||
|
@ -27,4 +28,4 @@
|
||||||
- name: Has any previous test failed?
|
- name: Has any previous test failed?
|
||||||
fail:
|
fail:
|
||||||
msg: "One or more tests failed, check log for details"
|
msg: "One or more tests failed, check log for details"
|
||||||
when: test_failed
|
when: test_failed
|
||||||
|
|
Loading…
Reference in a new issue