'Looks for file relative to base_path. If not found, checks relative to base_path/ansible.
If file extension is .yml | .yaml, parses as YAML, otherwise parses as JSON.
:return: ruamel.yaml.compat.ordereddict'

def _get_variables_from_file(self, var_file):

    abspath = path.abspath(var_file)
    if (not path.exists(abspath)):
        (dirname, filename) = path.split(abspath)
        raise AnsibleContainerConfigException((u'Variables    file    "%s"    not    found.    (I    looked    in    "%s"    for    it.)' % (filename, dirname)))
    logger.debug('Use    variable    file:    %s', abspath, file=abspath)
    if path.splitext(abspath)[(-1)].lower().endswith(('yml', 'yaml')):
        try:
            config = yaml.round_trip_load(open(abspath))
        except yaml.YAMLError as exc:
            raise AnsibleContainerConfigException((u'YAML    exception:    %s' % unicode(exc)))
    else:
        try:
            config = json.load(open(abspath))
        except Exception as exc:
            raise AnsibleContainerConfigException((u'JSON    exception:    %s' % unicode(exc)))
    return iteritems(config)
