summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/inventory/softlayer.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/inventory/softlayer.py b/contrib/inventory/softlayer.py
index 4d78f58b26..b1e915f74a 100755
--- a/contrib/inventory/softlayer.py
+++ b/contrib/inventory/softlayer.py
@@ -53,6 +53,7 @@ class SoftLayerInventory(object):
'primaryIpAddress',
'datacenter',
'tagReferences.tag.name',
+ 'userData.value',
]
vs_items = [
@@ -137,6 +138,8 @@ class SoftLayerInventory(object):
if 'primaryIpAddress' not in instance:
return
+ instance['userData'] = instance['userData'][0]['value'] if instance['userData'] else ''
+
dest = instance['primaryIpAddress']
self.inventory["_meta"]["hostvars"][dest] = instance