获得价值不确定的错误
我有这个剧本
---
- hosts: all
handlers:
- name: user-create
user: name=oracle state=present
tasks:
- name: "check user"
command: /usr/bin/id oracle
register: output
notify: user-create
when: output.rc == 1
但每当我在哪里oracle用户是不存在的,遇到了此问题
“失败”的系统上运行以下命令: true, “msg”:“条件检查'output.rc == 1'失败。错误是:评估条件时发生错误(output.rc == 1):'output'未定义\ n \ n错误似乎是已经在'/user-check.yml'中:第10行第5列,但可能在文件中的其他地方取决于确切的语法问题。\ n \ n违规l INE似乎是:\ n \ n任务:\ n - 名称:\ “检查用户\” \ n ^这里\ n”个