--- - 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 # TODO: Message Refactor :') - name: "Destroy {{ target_database }}" community.mysql.mysql_db: name: "{{ target_database }}" state: absent config_file: "/etc/mysql/mariadb.conf.d/50-client.cnf" login_password: "{{ mysql_root_password }}" - name: "Import database from {{ upload_directory }}/{{ uploaded_file }} to {{ target_database }}" community.mysql.mysql_db: name: "{{ target_database }}" state: import target: "/tmp/{{ uploaded_file }}" config_file: "/etc/mysql/mariadb.conf.d/50-client.cnf" login_password: "{{ mysql_root_password }}" - name: "Send mattermost message" 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 # TODO: Message Refactor :')