summaryrefslogtreecommitdiffstats
path: root/roles/wiki/tasks/docker.yml
blob: 1a759a411065ef67905e1a30527d9eb459607f54 (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
- name: Set up docker stuff if on docker
  apt:
    pkg:
      - lighttpd
      - supervisord
- name: Create the anon user
  user:
    name: anon
- name: Set up Ikiwiki setup
  template:
    src: emacsconf.setup
    dest: "{{ ikiwiki_path }}/emacsconf.setup"
    owner: www-data
    group: www-data
- name: Set up the ikiwiki directories
  file:
    dest: /var/www/html
    state: directory
    owner: www-data
    group: www-data
- name: Clone the bare git repo
  git:
    bare: true
    repo: "{{ ikiwiki_git_source_mount }}"
    dest: "{{ ikiwiki_bare_git_dir }}"
    version: "{{ ikiwiki_git_branch }}"
- name: Change owner
  file:
    dest: "{{ ikiwiki_bare_git_dir }}"
    recurse: true
    owner: www-data
    group: www-data
- name: Clone the working git repo
  git:
    repo: "{{ ikiwiki_bare_git_dir }}"
    dest: "{{ ikiwiki_src_dir }}"
    version: "{{ ikiwiki_git_branch }}"
- name: Copy supervisor config
  template:
    src: supervisord.conf
    dest: /etc/supervisor/conf.d/ikiwiki.conf
- name: Start lighttpd
  service:
    name: lighttpd
    state: started
- name: Start supervisord
  service:
    name: supervisor
    state: restarted