mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00:00
Fix 23417 (#27770)
* Expose user_metadat to ansible * Fixed exception when no userData
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user