Support file extension in playbook path

This allows us to specify the full playbook name, with file extension.
A documentation update is included in a following patch, as well as
a deprecation notice for the old form.

Change-Id: I19a3ec50e473f717a7e5e2824f702ad4e6acab02
This commit is contained in:
James E. Blair 2017-10-26 12:58:46 -07:00
parent 7edc25f773
commit 5192d9900e
1 changed files with 1 additions and 1 deletions

View File

@ -936,7 +936,7 @@ class AnsibleJob(object):
"non-trusted repo." % (entry, path)) "non-trusted repo." % (entry, path))
def findPlaybook(self, path, required=False, trusted=False): def findPlaybook(self, path, required=False, trusted=False):
for ext in ['.yaml', '.yml']: for ext in ['', '.yaml', '.yml']:
fn = path + ext fn = path + ext
if os.path.exists(fn): if os.path.exists(fn):
if not trusted: if not trusted: