summaryrefslogtreecommitdiff
path: root/baserock_bots/gitlab-bot.yml
diff options
context:
space:
mode:
authorPedro Alvarez Piedehierro <palvarez89@gmail.com>2017-05-15 22:14:43 +0100
committerPedro Alvarez Piedehierro <palvarez89@gmail.com>2017-05-15 22:16:16 +0100
commit9ea4b18fff0ad4d50a690c6f18145bf360080891 (patch)
treecdb09198c92c22b1958b5b3dd540d51a6f411a3c /baserock_bots/gitlab-bot.yml
parent65ba468bf9277393a861ef61f5f6ba77523edfd5 (diff)
downloadinfrastructure-9ea4b18fff0ad4d50a690c6f18145bf360080891.tar.gz
Add Ansible scripts for Gitlab IRC bot
Diffstat (limited to 'baserock_bots/gitlab-bot.yml')
-rw-r--r--baserock_bots/gitlab-bot.yml41
1 files changed, 41 insertions, 0 deletions
diff --git a/baserock_bots/gitlab-bot.yml b/baserock_bots/gitlab-bot.yml
new file mode 100644
index 00000000..f47cacd9
--- /dev/null
+++ b/baserock_bots/gitlab-bot.yml
@@ -0,0 +1,41 @@
+# Instance-specific configuration for the BuildStream Gitlab IRC bot
+---
+- hosts: paste
+ vars_files:
+ - gitlab_buildstream_secret.yml
+ vars:
+ - gitlab_to_irc_url: https://framagit.org/bnjbvr/gitlab-to-irc
+ - gitlab_to_irc_branch: master
+ - gitlab_to_irc_install_location: /home/ubuntu/gitlab-to-irc
+ tasks:
+ - name: Download gitlab-to-irc sources
+ git:
+ repo: "{{ gitlab_to_irc_url }}"
+ version: "{{ gitlab_to_irc_branch }}"
+ dest: "{{ gitlab_to_irc_install_location }}"
+
+ - name: Update packages based on package.json to their latest version.
+ npm:
+ path: "{{ gitlab_to_irc_install_location }}"
+ state: latest
+
+ - name: Install bot configuration file
+ template:
+ src: config.js
+ dest: "{{ gitlab_to_irc_install_location }}/config.js"
+
+
+ - name: Install service for the bot
+ template:
+ src: gitlab-bst-bot.conf
+ dest: /etc/init/gitlab-bst-bot.conf
+ become: yes
+
+
+ - name: Start bot service
+ service:
+ name: gitlab-bst-bot
+ enabled: yes
+ state: started
+ become: yes
+