Commit 0335d05f by Michael DeHaan

Check against None around playbook basedir

parent 16d25f41
...@@ -40,7 +40,10 @@ class VarsModule(object): ...@@ -40,7 +40,10 @@ class VarsModule(object):
""" main body of the plugin, does actual loading """ """ main body of the plugin, does actual loading """
inventory = self.inventory inventory = self.inventory
self.pb_basedir = os.path.abspath(inventory.playbook_basedir()) basedir = inventory.playbook_basedir()
if basedir is not None:
basedir = os.path.abspath(basedir)
self.pb_basedir = basedir
# sort groups by depth so deepest groups can override the less deep ones # sort groups by depth so deepest groups can override the less deep ones
groupz = sorted(inventory.groups_for_host(host.name), key=lambda g: g.depth) groupz = sorted(inventory.groups_for_host(host.name), key=lambda g: g.depth)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment