我正在学习 ansible 并编写了简单的剧本,但我不明白或者我做错了什么处理程序不起作用!请帮我。
我的剧本:
- hosts: HA
gather_facts: False
tasks:
- name: Installs pacemaker
yum: pkg=pacemaker,pcs,resource-agents state=latest
notify:
- pcsd start
handlers:
- name: pcsd start
systemd: name=pcsd state=started
Run Code Online (Sandbox Code Playgroud)
他跳过通知:
PLAY [HA] **********************************************************************
TASK [Installs pacemaker] ******************************************************
ok: [test-ha2]
ok: [test-ha1]
PLAY RECAP *********************************************************************
test-ha1 : ok=1 changed=0 unreachable=0 failed=0
test-ha2 : ok=1 changed=0 unreachable=0 failed=0
Run Code Online (Sandbox Code Playgroud)