mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix 23417 (#27770)
* Expose user_metadat to ansible * Fixed exception when no userData
This commit is contained in:
parent
bfe470d391
commit
3b20585ada
1 changed files with 3 additions and 0 deletions
|
@ -53,6 +53,7 @@ class SoftLayerInventory(object):
|
||||||
'primaryIpAddress',
|
'primaryIpAddress',
|
||||||
'datacenter',
|
'datacenter',
|
||||||
'tagReferences.tag.name',
|
'tagReferences.tag.name',
|
||||||
|
'userData.value',
|
||||||
]
|
]
|
||||||
|
|
||||||
vs_items = [
|
vs_items = [
|
||||||
|
@ -137,6 +138,8 @@ class SoftLayerInventory(object):
|
||||||
if 'primaryIpAddress' not in instance:
|
if 'primaryIpAddress' not in instance:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
instance['userData'] = instance['userData'][0]['value'] if instance['userData'] else ''
|
||||||
|
|
||||||
dest = instance['primaryIpAddress']
|
dest = instance['primaryIpAddress']
|
||||||
|
|
||||||
self.inventory["_meta"]["hostvars"][dest] = instance
|
self.inventory["_meta"]["hostvars"][dest] = instance
|
||||||
|
|
Loading…
Reference in a new issue