--- - name: "Send mattermost message" uri: url: "{{ mattermost_hook_smardigo }}" method: POST body: "{{ lookup('template','mattermost-deploy-start.json.j2') }}" body_format: json headers: Content-Type: "application/json" delegate_to: 127.0.0.1 become: false when: - send_status_messages - name: "Setup postgres for {{ inventory_hostname }}" include_role: name: postgres tasks_from: _postgres-acls - name: "Send mattermost messsge" uri: url: "{{ mattermost_hook_smardigo }}" method: POST body: "{{ lookup('template','mattermost-deploy-end.json.j2') }}" body_format: json headers: Content-Type: "application/json" delegate_to: 127.0.0.1 become: false when: - send_status_messages