def METHOD_NAME(self, rule, tmpfname, verbose=False):
    self.write_inventory()
    cmd = ["ansible-playbook", "-c", "local", "-i", self.inventory, tmpfname]
    proc = Popen(cmd, stdout=PIPE, stderr=PIPE)
    out, err = proc.communicate()
    pinfo(out)
    perror(err)
    if proc.returncode != 0:
        return RET_ERR
    if "failed=0" in out:
        return RET_OK
    return RET_ERR