summaryrefslogtreecommitdiff
path: root/roles/controller/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/controller/tasks/main.yml')
-rw-r--r--roles/controller/tasks/main.yml50
1 files changed, 50 insertions, 0 deletions
diff --git a/roles/controller/tasks/main.yml b/roles/controller/tasks/main.yml
new file mode 100644
index 0000000..e6ec7f1
--- /dev/null
+++ b/roles/controller/tasks/main.yml
@@ -0,0 +1,50 @@
+- name: "install controller dependencies and useful tools"
+ apt:
+ name:
+ - screen
+ - git
+ - haproxy
+ - psmisc
+ - python3
+ - python3-bottle
+ - python3-jwt
+ - python3-crypto
+ state: present
+
+- name: "install controller source"
+ git:
+ repo: git://git.liw.fi/wmf-ci-arch
+ dest: /srv/wmf-ci-arch
+
+- name: "create user for controller"
+ user:
+ name: _wmf
+ comment: "WMF CI"
+
+- name: "install key for checking incoming access tokens"
+ copy:
+ src: token.pub
+ dest: /etc/wmf_ci_token.pub
+ owner: root
+ group: root
+ mode: '0644'
+
+- name: "install API access token for controller"
+ copy:
+ content: "{{ controller_token }}"
+ dest: /etc/wmf_controller_token
+ owner: _wmf
+ group: _wmf
+ mode: '0600'
+
+- name: "install controller.service"
+ copy:
+ src: controller.service
+ dest: /lib/systemd/system/controller.service
+
+- name: "enable and (re)start controller"
+ systemd:
+ name: controller.service
+ daemon_reload: yes
+ enabled: yes
+ state: restarted