* Expose user_metadat to ansible

* Fixed exception when no userData
pull/27782/head
jctanner 7 years ago committed by Sloane Hertel
parent bfe470d391
commit 3b20585ada

@ -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

Loading…
Cancel
Save