|
|
@ -12,7 +12,6 @@ import platform
|
|
|
|
import os.path
|
|
|
|
import os.path
|
|
|
|
import subprocess
|
|
|
|
import subprocess
|
|
|
|
import json
|
|
|
|
import json
|
|
|
|
import pprint
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
filelist = [
|
|
|
|
filelist = [
|
|
|
|
'/etc/oracle-release',
|
|
|
|
'/etc/oracle-release',
|
|
|
@ -53,10 +52,14 @@ ansible_facts = {}
|
|
|
|
for fact in facts:
|
|
|
|
for fact in facts:
|
|
|
|
ansible_facts[fact] = parsed['ansible_facts']['ansible_'+fact]
|
|
|
|
ansible_facts[fact] = parsed['ansible_facts']['ansible_'+fact]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
nicename = ansible_facts['distribution'] + ' ' + ansible_facts['distribution_version']
|
|
|
|
|
|
|
|
|
|
|
|
output = {
|
|
|
|
output = {
|
|
|
|
|
|
|
|
'name': nicename,
|
|
|
|
'input': fcont,
|
|
|
|
'input': fcont,
|
|
|
|
'platform.dist': dist,
|
|
|
|
'platform.dist': dist,
|
|
|
|
'result': ansible_facts,
|
|
|
|
'result': ansible_facts,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
pprint.pprint(output)
|
|
|
|
print(json.dumps(output, indent=4))
|
|
|
|
|
|
|
|
|