Skip to content

Commit

Permalink
Skip host var parsing for directories.
Browse files Browse the repository at this point in the history
  • Loading branch information
fboender committed Apr 7, 2019
1 parent f515add commit ebd960a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ansiblecmdb/ansible.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ def _parse_hostvar_dir(self, inventory_path):
# variables for the host.
for file_entry in os.listdir(full_path):
p = os.path.join(full_path, file_entry)
self._parse_hostvar_file(hostname, p)
if not os.path.isdir(p):
self._parse_hostvar_file(hostname, p)

def _parse_hostvar_file(self, hostname, path):
"""
Expand Down

0 comments on commit ebd960a

Please sign in to comment.