blob: e8fd41d7f0c200c2b73dbab474fb9d1c193212a3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
# stagit ~~ roles/stagit/tasks/main.yml
# Init git user and settings
---
- name: ensure stagit is installed
package:
name: stagit
state: present
- name: create stagit static-files directory
file:
path: "{{ stagit_htmldir }}"
state: directory
owner: www
group: daemon
mode: 0755
- name: copy static-page generation script
copy:
src: generate-static-git.sh
dest: "{{ stagit_htmldir }}"
owner: www
group: "{{ group_root }}"
mode: 0744
- name: copy stagit stylesheet
copy:
src: style.css
dest: "{{ stagit_htmldir }}"
owner: www
group: "{{ group_root }}"
mode: 0644
- name: ensure httpd.d directory exists
file: path=/etc/httpd.d state=directory
- name: copy httpd configuration
copy:
src: httpd.conf
dest: /etc/httpd.d/stagit.conf
owner: "{{ user_root }}"
group: "{{ group_root }}"
mode: 0644
- name: download default website logo
get_url:
url: http://rgoncalves.se/logo.png
dest: "{{ stagit_htmldir }}/logo.png"
owner: www
group: "{{ group_root }}"
mode: 0644
ignore_errors: true
- name: enable cron job for static-page generation
cron:
name: "Static git-page generation"
minute: "*/5"
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: "{{ stagit_htmldir }}"
|