matic-insurance.deploy-notifications

Role Name

Build Status

This Ansible role sends notifications to a Slack channel about the deployment status. It identifies the user on the host system to indicate who started the deployment.

Requirements

  1. Obtain the webhook URL from Slack and extract the token:
  • URL: https://hooks.slack.com/services/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
  • Token: T02FC8HRT/B3QTFE7E0/QA0mMNQv5kVJoAvEEE9Y2qSs
  1. Set the token as the notifications_slack_token variable.

Role Variables

Here are the default variables with their default values:

notification_app_name: Unknown App
notification_environment_type: Unknown Instance
notification_deploy_info: deploying
notification_color: normal

With these variables, the final Slack message will appear as: Unknown App (Unknown Environment) deploying.

Dependencies

None

Example Playbook

Here's an example of how to use the role, including passing variables as parameters:

- hosts: all
  gather_facts: false
  
  roles:
    - role: matic-insurance.deploy-notification
      notification_deploy_info: 'deploy started'
      notification_color: 'warning'
      notifications_slack_token: '{{ slack_token }}'

The task notification runs only once on the local host.

In our projects, we send notifications at the start and end of a deployment to track when it is completed.

License

MIT

Author Information

Matic is a communication platform that connects lenders and borrowers during the home loan process. Borrowers can easily track their position in the loan process and know what steps they need to take to complete their loans.

Informazioni sul progetto

Notifications to slack about deploy start and finish

Installa
ansible-galaxy install matic-insurance.deploy-notifications
Licenza
mit
Download
400