New Slack stuff.
This commit is contained in:
parent
9596725b9e
commit
3f67049f38
|
|
@ -1 +1,2 @@
|
|||
*.swp
|
||||
secure.yml
|
||||
|
|
|
|||
10
README.md
10
README.md
|
|
@ -16,6 +16,7 @@ This script loads input from:
|
|||
- molecule/default/playbook.yml*
|
||||
- molecule/default/verify.yml
|
||||
- generate_modules.sh
|
||||
- secure.yml
|
||||
- Ansible Galaxy
|
||||
|
||||
(Items with a star are mandatory)
|
||||
|
|
@ -69,6 +70,15 @@ author: Robert de Bock (robert@meinit.nl)
|
|||
author_website: "https://robertdebock.nl/"
|
||||
```
|
||||
|
||||
## secure.yml
|
||||
|
||||
This file contains a secret unique to you; te slack encryption token. You have to create this file yourself and it should contain:
|
||||
|
||||
```yaml
|
||||
---
|
||||
slack_token: "YOUR_SLACK_USERNAME:YOUR_SLACK_TOKEN"
|
||||
```
|
||||
|
||||
## meta/version.yml
|
||||
|
||||
This optional file can be placed when a role contains a version.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
[defaults]
|
||||
vault_password_file=vault_password_file.txt
|
||||
20
generate.yml
20
generate.yml
|
|
@ -125,6 +125,26 @@
|
|||
file: "{{ role_path }}/.travis.yml"
|
||||
name: travis
|
||||
|
||||
- name: load secure.yml
|
||||
include_vars:
|
||||
file: secure.yml
|
||||
name: secure
|
||||
|
||||
- name: generate secure hash
|
||||
command: /usr/bin/travis encrypt --pro {{ secure.slack_token }} --no-interactive
|
||||
register: travis_secure
|
||||
when:
|
||||
- travis.notifications.slack.secure | length < 512
|
||||
|
||||
- name: overwrite travis.notifications.slack.secure
|
||||
set_fact:
|
||||
travis:
|
||||
notifications:
|
||||
slack:
|
||||
secure: "{{ travis_secure.stdout }}"
|
||||
when:
|
||||
travis_secure.stdout is defined
|
||||
|
||||
- name: create .github directory
|
||||
file:
|
||||
path: "{{ role_path }}/.github"
|
||||
|
|
|
|||
|
|
@ -37,5 +37,5 @@ script:
|
|||
notifications:
|
||||
webhooks: https://galaxy.ansible.com/api/v1/notifications/
|
||||
slack:
|
||||
secure: "{{ travis.notifications.slack.secure }}"
|
||||
secure: {{ travis.notifications.slack.secure }}
|
||||
email: false
|
||||
|
|
|
|||
Loading…
Reference in New Issue