HI
I have a code in my playbook like this :
- name: Copy init scripts
template: src=file-server.conf.j2 dest=/etc/init/file-server.conf
register: init_script
notify: restart file-server
- name: Copy env scripts
template: src=file-server.env.j2 dest=/etc/default/file-server.env
register: env_script
notify: restart file-server
I want to notify the handler for both tasks in one “handler”. I tried :
- name: restart file-server
service: name=file-server state=restarted
when: {{ item}}.changed
with_items:
- init_script
- env_script
but it doesn’t work!!
Any ideas ?