mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02: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:
parent
57574881ae
commit
4e0013d161
1 changed files with 3 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue