我正在尝试通过调用处理程序来重新启动tomcat,并且我需要根据变量的条件进行调用。不知何故它没有被调用。
- block:
- debug:
msg: "Configuration changes detected but no deployment, So proceeding with tomcat restart !!!!"
notify:
- Restart tomcat
- meta: end_play
when: config_var.changed == true and myvm_release_version == current_release
我可以看到正在显示的消息,这意味着满足when条件但未调用该处理程序之后。
输出-
Sunday 31 May 2020 20:54:53 +0100 (0:00:00.084) 0:00:06.902 ************
server1 ok: {
"changed": false,
"msg": "Configuration changes detected but no deployment, So proceeding with tomcat restart !!!!"
}