summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2015-01-14 17:06:33 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2015-01-14 17:06:33 +0000
commitb2a44e0fc3b644c5150f0fbc555679d816887acc (patch)
treed735719fc00a632bf3f27a43ff04212b6cd89d7f
parenta78462bdb9e88945c5e067de46a5c91957c3166c (diff)
downloadmorph-b2a44e0fc3b644c5150f0fbc555679d816887acc.tar.gz
Add Ansible playbooks for distbuild admin
-rw-r--r--distbuild/ansible/restart.yaml16
-rw-r--r--distbuild/ansible/use-latest-morph.yaml21
2 files changed, 37 insertions, 0 deletions
diff --git a/distbuild/ansible/restart.yaml b/distbuild/ansible/restart.yaml
new file mode 100644
index 00000000..6cd02be4
--- /dev/null
+++ b/distbuild/ansible/restart.yaml
@@ -0,0 +1,16 @@
+---
+- hosts: controller
+ tasks:
+ - name: restart controller processes
+ service: name={{ item }} state=restarted
+ with_items:
+ - morph-controller-helper.service
+ - morph-controller.service
+
+- hosts: workers
+ tasks:
+ - name: restart worker processes
+ service: name={{ item }} state=restarted
+ with_items:
+ - morph-worker-helper.service
+ - morph-worker.service
diff --git a/distbuild/ansible/use-latest-morph.yaml b/distbuild/ansible/use-latest-morph.yaml
new file mode 100644
index 00000000..6e07e8e0
--- /dev/null
+++ b/distbuild/ansible/use-latest-morph.yaml
@@ -0,0 +1,21 @@
+---
+- hosts: all
+ vars:
+ - TROVE_HOST: git.baserock.org
+ - MORPH_VERSION: master
+ tasks:
+ - name: check out Morph repository
+ command: git clone git://{{ TROVE_HOST }}/baserock/baserock/morph /srv/morph
+ args:
+ creates: /srv/morph
+
+ - name: check out specified version of Morph
+ command: git checkout {{ MORPH_VERSION }}
+ args:
+ chdir: /srv/morph
+
+ - name: ensure latest Morph is used
+ file: path=/usr/bin/{{ item }} src=/srv/morph/{{ item }} state=link force=yes
+ with_items:
+ - morph
+ - distbuild-helper