summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Franke <nobody@nowhere.ws>2015-08-29 00:12:09 +0200
committerChristian Franke <nobody@nowhere.ws>2015-08-29 00:12:09 +0200
commit22f38756dd298a4e45149ecc2dbc68d7ed1deb46 (patch)
treeb88bfe26f957a8f814b5f457eb75f8e20d1b5d41
parent0f001083314fb62c15be19732260e5b841c6bb51 (diff)
Don't fetch website in buildscript during ansible run
-rw-r--r--roles/sublab_web/handlers/as_webuser.yaml2
-rw-r--r--roles/sublab_web/templates/website-rebuild.sh.j27
2 files changed, 6 insertions, 3 deletions
diff --git a/roles/sublab_web/handlers/as_webuser.yaml b/roles/sublab_web/handlers/as_webuser.yaml
index 11e8074..48f2765 100644
--- a/roles/sublab_web/handlers/as_webuser.yaml
+++ b/roles/sublab_web/handlers/as_webuser.yaml
@@ -1,5 +1,5 @@
---
- name: Rebuild subweb website
- shell: ./website-rebuild.sh
+ shell: ./website-rebuild.sh -l
args:
chdir: "/var/www/{{sublab_web_server_name}}"
diff --git a/roles/sublab_web/templates/website-rebuild.sh.j2 b/roles/sublab_web/templates/website-rebuild.sh.j2
index 1e4bc0b..ac29e3d 100644
--- a/roles/sublab_web/templates/website-rebuild.sh.j2
+++ b/roles/sublab_web/templates/website-rebuild.sh.j2
@@ -4,8 +4,11 @@
#
cd /var/www/{{sublab_web_server_name}}/htdocs
-git fetch git://{{ groups['gitservers'][0] }}/website.git master
-git reset --hard FETCH_HEAD
+
+if [ x"$1" != x"-l" ]; then
+ git fetch git://{{ groups['gitservers'][0] }}/website.git master
+ git reset --hard FETCH_HEAD
+fi
cd scripts
python template.py
python wikitemplate.py > ../../wiki-page.tmpl