summaryrefslogtreecommitdiffstats
path: root/roles/deploy_website/tasks
diff options
context:
space:
mode:
authorMichael Scherer <misc@zarb.org>2014-12-16 18:50:56 +0100
committerMichael Scherer <misc@zarb.org>2014-12-16 18:50:56 +0100
commit42361994b26daf7b91738a0ab992cd4a54eef976 (patch)
treea1d1e92795d012cc236a72c3a02acade678ad555 /roles/deploy_website/tasks
parentcc7cc8f8f1b6f3771d6d885744edf23bb99a0914 (diff)
Add a role to deploy the website directly from git
Diffstat (limited to 'roles/deploy_website/tasks')
-rw-r--r--roles/deploy_website/tasks/main.yml10
1 files changed, 10 insertions, 0 deletions
diff --git a/roles/deploy_website/tasks/main.yml b/roles/deploy_website/tasks/main.yml
new file mode 100644
index 0000000..3111048
--- /dev/null
+++ b/roles/deploy_website/tasks/main.yml
@@ -0,0 +1,10 @@
+---
+- yum: name={{ item }} state=installed
+ with_items:
+ - git
+
+- file: dest={{ checkout_dest }} state=directory
+
+- git: repo={{ git_repo }} dest={{ checkout_dest }}
+
+- cron: name="{{ git_repo }} autoupdate" hour=* job="cd {{ checkout_dest }} ; git pull --rebase -q ; cp -f -R {{ subdir }} {{ destination }}"