Remove Mattermost information.

This commit is contained in:
2025-05-05 06:11:07 +00:00
parent 9b3d116cd2
commit e4ae52ed22

View File

@@ -5,10 +5,8 @@
gather_facts: true
tasks:
- name: Cleanup semaphore
block:
- include_vars: vars/mattermost.yaml
- include_vars: vars/semaphore.yaml
- name: Include variables
include_vars: vars/semaphore.yaml
- name: Search for volume's backup directories
become: yes
@@ -120,30 +118,3 @@
with_items: "{{ backup_files.results | map(attribute='files') | list }}"
loop_control:
label: "{{ item.path }}"
- name: Inform Mattermost about success
uri:
url: "{{ mattermost_url }}"
method: POST
body_format: json
body:
channel_id: "{{ channel_id }}"
message: "{{ ansible_date_time.date }} {{ ansible_date_time.time }}: Playbook ran successful ({{ ansible_play_name }})"
headers:
Content-Type: application/json
Authorization: "Bearer {{ semaphore_token }}"
status_code: [200, 201]
rescue:
- name: Inform Mattermost about error
uri:
url: "{{ mattermost_url }}"
method: POST
body_format: json
body:
channel_id: "{{ channel_id }}"
message: "{{ ansible_date_time.date }} {{ ansible_date_time.time }}: Playbook ran with error ({{ ansible_play_name }})"
headers:
Content-Type: application/json
Authorization: "Bearer {{ error_token }}"
status_code: [200, 201]