def load_config(config_file):
    config_path = (config_file if config_file else '.ansible-lint')
    if os.path.exists(config_path):
        with open(config_path, 'r') as stream:
            try:
                return yaml.load(stream)
            except yaml.YAMLError:
                pass
    return None
def load_config(config_file):
    config_path = (config_file if config_file else '.ansible-lint')
    if os.path.exists(config_path):
        with open(config_path, 'r') as stream:
            try:
                return yaml.load(stream)
            except yaml.YAMLError:
                pass
    return None