mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00:00
playbook, include: fix Unexpected Exception: 'NoneType' object has no attribute 'strip' (#15574)
If `include:` statement is used without argument, we get a traceback.
This commit is contained in:
committed by
James Cammarata
parent
57574881ae
commit
4e0013d161
@@ -135,6 +135,9 @@ class PlaybookInclude(Base, Conditional, Taggable):
|
||||
Splits the include line up into filename and parameters
|
||||
'''
|
||||
|
||||
if v is None:
|
||||
raise AnsibleParserError("include parameter is missing", obj=ds)
|
||||
|
||||
# The include line must include at least one item, which is the filename
|
||||
# to include. Anything after that should be regarded as a parameter to the include
|
||||
items = split_args(v)
|
||||
|
||||
Reference in New Issue
Block a user