mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
committed by
John R Barker
parent
4f29662a9e
commit
9a5a61bdca
@@ -60,7 +60,7 @@ parsed = json.loads(ansible_out[ansible_out.index('{'):])
|
||||
ansible_facts = {}
|
||||
for fact in facts:
|
||||
try:
|
||||
ansible_facts[fact] = parsed['ansible_facts']['ansible_'+fact]
|
||||
ansible_facts[fact] = parsed['ansible_facts']['ansible_' + fact]
|
||||
except:
|
||||
ansible_facts[fact] = "N/A"
|
||||
|
||||
@@ -74,4 +74,3 @@ output = {
|
||||
}
|
||||
|
||||
print(json.dumps(output, indent=4))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user