playbook, include: fix Unexpected Exception: 'NoneType' object has no attribute 'strip' (#15574)

If `include:` statement is used without argument, we get a traceback.
pull/15377/merge
René Moser 9 years ago 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)

Loading…
Cancel
Save