Skip to content

Latest commit

 

History

History
 
 

setup-slack

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Setup Slack Team

An ansible role to setup slack team.

Role Variables

This is a sample of a YAML file containing the variables.

---
slack_token: XXXXXXXXXXX
slack_users:
  - first_name: AAA
    last_name: BBBB
    email: aaabbb@example.com
    channels:
      - "a"
      - "b"
      - "c"
slack_channels:
  - name: "c"
    private: no

Here are the description of each variables:

Due to the sensitive nature of the variables it's best to use ansible-vault to create the vars.yml

Steps:

  1. $ ansible-vault create vars.yml it will ask for a password and it will be needed when we're running the playbook later
  2. Specify the variables in the file and save it

Important note:

  • You must be running this as an Admin user in the Slack workspace.

Running the Playbook

$ ansible-playbook -e "@path/to/vars.yml" playbooks/setup_slack.yml --ask-vault-pass and enter the password you've previously set for vars.yml

Example Playbook

- hosts: servers
  roles:
     - { role: setup-slack }  

License

Apache License 2.0

Author Information

Red Hat Community of Practice & staff of the Red Hat Open Innovation Labs.