diff options
author | jctanner <tanner.jc@gmail.com> | 2017-08-04 19:28:40 +0200 |
---|---|---|
committer | Sloane Hertel <shertel@redhat.com> | 2017-08-04 19:28:40 +0200 |
commit | 3b20585ada7b5333d8ef6879d78124514436bbff (patch) | |
tree | 33a4ea99df8b658f93ef2968d67a3291676aa071 /contrib | |
parent | Minor edit (diff) | |
download | ansible-3b20585ada7b5333d8ef6879d78124514436bbff.tar.xz ansible-3b20585ada7b5333d8ef6879d78124514436bbff.zip |
Fix 23417 (#27770)
* Expose user_metadat to ansible
* Fixed exception when no userData
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/inventory/softlayer.py | 3 |
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 |