'Check if image is already in local docker index.'

def is_image_local(self, image):

    result = self.execute_module('docker_image_facts', {'name': image})
    if result.get('failed', False):
        return False
    return bool(result.get('images', []))
