How to get inventory path in call back plugin:
I found this, however it is not working
def v2_playbook_on_start(self, playbook):
|
|
On Ansible v2, Ansible doesn’t set self.playbook automatically
|
|
self.playbook = playbook
|
|
|
|
playbook_file_name = self.playbook._file_name
|
|
inventory = self._options.inventory
|
|
|
|
self.start_timer()
|
|
|
|
Set the playbook name from its filename
|
|
self._playbook_name, _ = os.path.splitext(
|
|
os.path.basename(playbook_file_name))
|
|
if isinstance(inventory, list):
|
|
inventory = ‘,’.join(inventory)
|
|
self._inventory_name = ‘,’.join([os.path.basename(os.path.realpath(name)) for name in inventory.split(‘,’) if name])
|
In short, is there a way to check which parameter is used for what in v2_playbook_on_start(self, playbook):
Any update on this will be appreciated
You might wanna try the developer list.
dan_linder
(Daniel Linder)
5