summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--roles/http/tasks/main.yml12
-rw-r--r--roles/http/templates/update_http9
-rw-r--r--todo.txt1
3 files changed, 21 insertions, 1 deletions
diff --git a/roles/http/tasks/main.yml b/roles/http/tasks/main.yml
index f8a0078..9d2ae22 100644
--- a/roles/http/tasks/main.yml
+++ b/roles/http/tasks/main.yml
@@ -100,3 +100,15 @@
owner: nginx
group: nginx
mode: "600"
+
+- name: Install script to update http
+ ansible.builtin.template:
+ src: update_http
+ dest: /usr/bin/update_http
+ mode: "755"
+
+- name: Install daily crontab to update http
+ ansible.builtin.cron:
+ special_time: daily
+ name: Update http
+ job: /usr/bin/update_http
diff --git a/roles/http/templates/update_http b/roles/http/templates/update_http
new file mode 100644
index 0000000..354dfd2
--- /dev/null
+++ b/roles/http/templates/update_http
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+cd {{ src_dir }}/joeac.net/http
+git pull
+if make -q
+then
+ make
+ rc-service nginx restart
+fi
diff --git a/todo.txt b/todo.txt
index 7d867bd..55bbee5 100644
--- a/todo.txt
+++ b/todo.txt
@@ -1,5 +1,4 @@
Make dyndns self-updating
-Make http self-updating
Make ln self-updating
Make mox self-updating
Make vaultwarden self-updating