romach
4/19/2017 - 12:05 AM

Run task depending on another

Run task depending on another

- hosts: webservers
  tasks:
    - name: update docker config
      copy: src=files/dockre.conf dest=/etc/docker.conf
      notify:
        - reload docker
      become: yes
  
  # executes after all tasks only if 'update docker config' task has been executed 
  handlers:
    - name: reload docker
      service: name=docker state=reloaded
      become: yes