|
|
@ -21,10 +21,9 @@ __metaclass__ = type
|
|
|
|
|
|
|
|
|
|
|
|
import copy
|
|
|
|
import copy
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
import stat
|
|
|
|
import json
|
|
|
|
import subprocess
|
|
|
|
import subprocess
|
|
|
|
|
|
|
|
from yaml import YAMLError
|
|
|
|
from yaml import load, YAMLError
|
|
|
|
|
|
|
|
from ansible.compat.six import text_type, string_types
|
|
|
|
from ansible.compat.six import text_type, string_types
|
|
|
|
|
|
|
|
|
|
|
|
from ansible.errors import AnsibleFileNotFound, AnsibleParserError, AnsibleError
|
|
|
|
from ansible.errors import AnsibleFileNotFound, AnsibleParserError, AnsibleError
|
|
|
@ -145,7 +144,10 @@ class DataLoader():
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
return loader.get_single_data()
|
|
|
|
return loader.get_single_data()
|
|
|
|
finally:
|
|
|
|
finally:
|
|
|
|
|
|
|
|
try:
|
|
|
|
loader.dispose()
|
|
|
|
loader.dispose()
|
|
|
|
|
|
|
|
except AttributeError:
|
|
|
|
|
|
|
|
pass # older versions of yaml don't have dispose function, ignore
|
|
|
|
|
|
|
|
|
|
|
|
def _get_file_contents(self, file_name):
|
|
|
|
def _get_file_contents(self, file_name):
|
|
|
|
'''
|
|
|
|
'''
|
|
|
|