Remove Mattermost information.
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user