好吧,這是我的任務:Ansible通知處理doen't執行
---
- name: copy source list
copy: src=sources.list dest=/etc/apt/sources.list
notify: update apt
# - name: Update apt
# shell: apt-get update
- name: Install postgres
shell: apt-get install -q -y postgresql-9.1
#apt: name=postgresql-9.1 state=present
- others tasks...
這裏是我的處理程序:
- name: update apt
action: apt-get update
當我運行它不會通知。
...
TASK: [postgresql | copy source list] *****************************************
changed: [host_slave2]
changed: [host_slave1]
changed: [host_pgpool]
changed: [host_master]
TASK: [postgresql | Install postgres] *****************************************
changed: [host_slave1]
changed: [host_master]
changed: [host_slave2]
changed: [host_pgpool]
...
複製後,我應該看到通知,什麼是錯的?
通知來執行,在你取消或讓它運行到結束的遊程的盡頭?我建議增加冗長。最後,[apt * modules](http://docs.ansible.com/list_of_packaging_modules.html)非常棒。 – tedder42 2014-09-18 23:45:50