summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Doan <andy.doan@linaro.org>2016-03-29 13:40:04 -0500
committerAndy Doan <andy.doan+gerrit@linaro.org>2016-03-30 13:49:44 +0000
commite3b919ebcc5c7274e615c1e5fb0219e0878bc608 (patch)
treec622bfe007bb3ed6d652f06da74839b2bcfb5269
parent1ec0443aba6fffc411f6152ec1627ca5db9762df (diff)
patchwork: remove use of patchwork role run after django
The only thing we really did after the django role was run that couldn't be done in the "pre" role was running the "ensure_projects" script. In practice that task isn't really useful or needed. This removes that task, and adds the others to the "pre" role tasks. Change-Id: I2ec0a4f47d3201cf1779afdac4cf393d31357aee Reviewed-on: https://review.linaro.org/11106 Reviewed-by: Ben Copeland <ben.copeland@linaro.org> Reviewed-by: Paul Sokolovsky <paul.sokolovsky@linaro.org> Reviewed-by: Andy Doan <andy.doan+gerrit@linaro.org>
-rw-r--r--per-service/patchwork/roles/patchwork-pre-django/tasks/main.yml18
-rw-r--r--per-service/patchwork/roles/patchwork/tasks/main.yml26
-rw-r--r--per-service/patchwork/site.yml1
3 files changed, 18 insertions, 27 deletions
diff --git a/per-service/patchwork/roles/patchwork-pre-django/tasks/main.yml b/per-service/patchwork/roles/patchwork-pre-django/tasks/main.yml
index 195edff1..a7333010 100644
--- a/per-service/patchwork/roles/patchwork-pre-django/tasks/main.yml
+++ b/per-service/patchwork/roles/patchwork-pre-django/tasks/main.yml
@@ -9,6 +9,10 @@
file: path={{install_base}}/{{hostname}}
owner={{apache_user}} group={{apache_user}} mode=0755 state=directory
+- name: Create directory for git repos
+ file: path="{{install_base}}/{{hostname}}/repos" state=directory
+ owner={{apache_user}} group={{apache_user}}
+
- name: Install patchwork tools
git: repo=https://git.linaro.org/infrastructure/patchwork-tools.git
dest={{install_base}}/{{hostname}}/tools
@@ -24,3 +28,17 @@
notify: restart-apache
tags:
- update
+
+- name: Install cron for patchwork
+ template: src=templates/patchwork.cron.d dest=/etc/cron.d/patchwork
+ owner=root group=root mode=0644
+
+- name: Clone django-crowd-rest-backend repository
+ git: repo=http://git.linaro.org/lava/django-crowd-rest-backend.git
+ dest=/srv/django-crowd-rest-backend version="HEAD"
+ register: crowdbackend
+
+- name: Install django-crowd-rest-backed
+ command: python ./setup.py install
+ chdir=/srv/django-crowd-rest-backend
+ when: crowdbackend is defined and crowdbackend.changed
diff --git a/per-service/patchwork/roles/patchwork/tasks/main.yml b/per-service/patchwork/roles/patchwork/tasks/main.yml
deleted file mode 100644
index a7c5dfd1..00000000
--- a/per-service/patchwork/roles/patchwork/tasks/main.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-- name: Ensure default projects exist
- command: "{{install_base}}/{{hostname}}/tools/ensure_projects.py"
- register: ensure_projects
- changed_when: "'Creating project:' in ensure_projects.stdout"
-
-- name: Create directory for git repos
- file: path="{{install_base}}/{{hostname}}/repos" state=directory
- owner={{apache_user}} group={{apache_user}}
- tags:
- - cron
-
-- name: Install cron for patchwork
- template: src=templates/patchwork.cron.d dest=/etc/cron.d/patchwork
- owner=root group=root mode=0644
- tags:
- - cron
-
-- name: Clone django-crowd-rest-backend repository
- git: repo=http://git.linaro.org/lava/django-crowd-rest-backend.git
- dest=/srv/django-crowd-rest-backend version="HEAD"
- register: crowdbackend
-
-- name: Install django-crowd-rest-backed
- command: python ./setup.py install
- chdir=/srv/django-crowd-rest-backend
- when: crowdbackend is defined and crowdbackend.changed
diff --git a/per-service/patchwork/site.yml b/per-service/patchwork/site.yml
index 9efbb521..bca365da 100644
--- a/per-service/patchwork/site.yml
+++ b/per-service/patchwork/site.yml
@@ -9,7 +9,6 @@
- patchwork-pre-django
- {role: django, tags: [django]}
- {role: apache-site, src: apache.conf, config: "{{inventory_hostname}}", tags: [apache] }
- - patchwork
- name: Configure extra syncing for patches.linaro.org
hosts: patches.linaro.org