Merge pull request #12703 from keitwb/inventory_file_var

Adding the inventory_file var back
pull/4420/head
James Cammarata 2015-10-11 16:04:34 -04:00
commit eb60ce1b6e
1 changed files with 1 additions and 0 deletions

View File

@ -356,6 +356,7 @@ class VariableManager:
if self._inventory is not None: if self._inventory is not None:
variables['inventory_dir'] = self._inventory.basedir() variables['inventory_dir'] = self._inventory.basedir()
variables['inventory_file'] = self._inventory.src()
if play: if play:
# add the list of hosts in the play, as adjusted for limit/filters # add the list of hosts in the play, as adjusted for limit/filters
# DEPRECATED: play_hosts should be deprecated in favor of ansible_play_hosts, # DEPRECATED: play_hosts should be deprecated in favor of ansible_play_hosts,