The Ansible playbook

I am only going to cover the updating of the tasks for a single role here, and it is the role that creates the VPC. The first change I made was to add a few lines to the group_vars/common.yml file:

---environment_name: "VPC-Slack"ec2_region: "eu-west-1"slack:  token: "TBCRVDMGA/BBCPTPNH1/tyudQIccviG7gh4JnfeoPScc"  username: "Ansible"  icon: "https://upload.wikimedia.org/wikipedia/commons/thumb/0/05/Robot_icon.svg/200px-Robot_icon.svg.png"

As you can see, I added the following three nested variables:

  • token: This is taken from the Webhook URL; as you can see, I entered everything after https://hooks.slack.com/services/
  • username: We can override the username through which the updates will be posted, as I just kept it as Ansible ...

Get Learn Ansible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.