rmeove ext requirement for yaml inventory plugin

returns to the state before 2.4 made it a requirement
fixes #30855

(cherry picked from commit 82de2e1865)
This commit is contained in:
Brian Coca 2017-09-27 09:53:56 -04:00
parent f993e213da
commit 53f865d094
2 changed files with 2 additions and 1 deletions

View file

@ -51,6 +51,7 @@ Ansible Changes By Release
* it is import_playbook .. not import_plays .. docs now reflect this * it is import_playbook .. not import_plays .. docs now reflect this
* fixed typo and missed include/import conversion in import_tasks docs * fixed typo and missed include/import conversion in import_tasks docs
* updated porting docs with note about inventory_dir * updated porting docs with note about inventory_dir
* removed extension requirement for yaml inventory plugin to restore previous behaviour
<sdfasdfsadfsdflkjsdfklj3oiqrua id="2.4"></a> <sdfasdfsadfsdflkjsdfklj3oiqrua id="2.4"></a>

View file

@ -74,7 +74,7 @@ class InventoryModule(BaseFileInventoryPlugin):
valid = False valid = False
if super(InventoryModule, self).verify_file(path): if super(InventoryModule, self).verify_file(path):
file_name, ext = os.path.splitext(path) file_name, ext = os.path.splitext(path)
if ext and ext in C.YAML_FILENAME_EXTENSIONS: if not ext or ext in C.YAML_FILENAME_EXTENSIONS:
valid = True valid = True
return valid return valid