From bbd1f41471be6e56b0ccd4dc60d0a7aba11ab7b6 Mon Sep 17 00:00:00 2001 From: Chris Meyers Date: Wed, 22 Apr 2015 07:05:36 -0400 Subject: [PATCH] track azure vm by unique identifier --- awx/plugins/inventory/windows_azure.py | 3 ++- awx/settings/defaults.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/awx/plugins/inventory/windows_azure.py b/awx/plugins/inventory/windows_azure.py index 0d04b17392..dede09d179 100755 --- a/awx/plugins/inventory/windows_azure.py +++ b/awx/plugins/inventory/windows_azure.py @@ -242,7 +242,8 @@ class AzureInventory(object): self.host_metadata[hostname] = dict(ansible_ssh_host=dest, ansible_ssh_port=int(ssh_port), - instance_status=status) + instance_status=status, + private_id=deployment.private_id) # List of all azure deployments self.push(self.inventory, "azure", hostname) diff --git a/awx/settings/defaults.py b/awx/settings/defaults.py index 21366bc6e0..ddcbc05167 100644 --- a/awx/settings/defaults.py +++ b/awx/settings/defaults.py @@ -521,7 +521,7 @@ AZURE_ENABLED_VALUE = 'ReadyRole' AZURE_GROUP_FILTER = r'^.+$' AZURE_HOST_FILTER = r'^.+$' AZURE_EXCLUDE_EMPTY_GROUPS = True -AZURE_INSTANCE_ID_VAR = None +AZURE_INSTANCE_ID_VAR = 'private_id' # ---------------------