aboutsummaryrefslogtreecommitdiffstats
path: root/roles/stagit
diff options
context:
space:
mode:
authorbinary <me@rgoncalves.se>2020-12-16 22:15:16 +0100
committerbinary <me@rgoncalves.se>2020-12-16 22:15:16 +0100
commit44355d99e5fa9316e8f537cb8a0a2bf9f1f1680e (patch)
treeff997f7db829639750d436fda3e7bf5d082ba085 /roles/stagit
parent805ab88bea7cf00dde6a10cbd593c55b502e0694 (diff)
downloadinfrastructure-44355d99e5fa9316e8f537cb8a0a2bf9f1f1680e.tar.gz
Use more variables for stagit role
Diffstat (limited to 'roles/stagit')
-rw-r--r--roles/stagit/tasks/main.yml12
-rw-r--r--roles/stagit/vars/main.yml10
2 files changed, 16 insertions, 6 deletions
diff --git a/roles/stagit/tasks/main.yml b/roles/stagit/tasks/main.yml
index 33a26be..e8fd41d 100644
--- a/roles/stagit/tasks/main.yml
+++ b/roles/stagit/tasks/main.yml
@@ -11,7 +11,7 @@
- name: create stagit static-files directory
file:
- path: /var/www/htdocs/stagit
+ path: "{{ stagit_htmldir }}"
state: directory
owner: www
group: daemon
@@ -20,7 +20,7 @@
- name: copy static-page generation script
copy:
src: generate-static-git.sh
- dest: /var/www/htdocs/stagit
+ dest: "{{ stagit_htmldir }}"
owner: www
group: "{{ group_root }}"
mode: 0744
@@ -28,7 +28,7 @@
- name: copy stagit stylesheet
copy:
src: style.css
- dest: /var/www/htdocs/stagit
+ dest: "{{ stagit_htmldir }}"
owner: www
group: "{{ group_root }}"
mode: 0644
@@ -47,7 +47,7 @@
- name: download default website logo
get_url:
url: http://rgoncalves.se/logo.png
- dest: /var/www/htdocs/stagit/logo.png
+ dest: "{{ stagit_htmldir }}/logo.png"
owner: www
group: "{{ group_root }}"
mode: 0644
@@ -57,9 +57,9 @@
cron:
name: "Static git-page generation"
minute: "*/5"
- job: "cd /var/www/htdocs/stagit && ./generate-static-git.sh >/dev/null 2>&1"
+ job: "cd {{ stagit_htmldir }} && ./generate-static-git.sh >/dev/null 2>&1"
- name: execute static-page generation script once
shell: ./generate-static-git.sh
args:
- chdir: /var/www/htdocs/stagit
+ chdir: "{{ stagit_htmldir }}"
diff --git a/roles/stagit/vars/main.yml b/roles/stagit/vars/main.yml
new file mode 100644
index 0000000..a33cccf
--- /dev/null
+++ b/roles/stagit/vars/main.yml
@@ -0,0 +1,10 @@
+
+# git ~~ roles/git/tasks/vars.yml
+# default vars for git role
+
+---
+
+stagit_user: "git"
+stagit_group: "git"
+stagit_dir: "/data/git/"
+stagit_htmldir: "/var/www/htocs/stagit/"
remember that computers suck.