Save the play uuid provided by Ansible when recording the play

This will allow clients and plugins running within Ansible to identify
which play they are in and which playbook they are in.

Change-Id: I734999473423992d69555bb84bf601acf62d1eb8
Depends-On: https://review.openstack.org/#/c/609076/
This commit is contained in:
David Moreau Simard 2018-10-09 14:10:43 -04:00
parent f3e4d101e2
commit 1ea26c9a59
No known key found for this signature in database
GPG Key ID: CBEB466764A9E621
1 changed files with 1 additions and 1 deletions

View File

@ -143,7 +143,7 @@ class CallbackModule(CallbackBase):
self._load_files(play._loader._FILE_CACHE.keys())
# Create the play
self.play = self.client.post("/api/v1/plays", name=play.name, playbook=self.playbook["id"])
self.play = self.client.post("/api/v1/plays", name=play.name, uuid=play._uuid, playbook=self.playbook["id"])
# Record all the hosts involved in the play
self._load_hosts(play._variable_manager._inventory._restriction)