From b2a44e0fc3b644c5150f0fbc555679d816887acc Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Wed, 14 Jan 2015 17:06:33 +0000 Subject: Add Ansible playbooks for distbuild admin --- distbuild/ansible/restart.yaml | 16 ++++++++++++++++ distbuild/ansible/use-latest-morph.yaml | 21 +++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 distbuild/ansible/restart.yaml create mode 100644 distbuild/ansible/use-latest-morph.yaml 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 -- cgit v1.2.1