summaryrefslogtreecommitdiffstats
path: root/roles/wiki/tasks/docker.yml
blob: 2bfe61395712a224b1718c493c972d9900a8bdf3 (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
- name: Set up docker stuff if on docker
  apt:
    pkg:
      - lighttpd
      - supervisor
      - sudo
- name: Clone the working git repo
  git:
    repo: "{{ ikiwiki_bare_git_dir }}"
    dest: "{{ ikiwiki_src_dir }}"
    version: "{{ ikiwiki_git_branch }}"
- name: Chown all the files to ikiwiki
  file:
    dest: "{{ ikiwiki_src_dir }}"
    owner: ikiwiki
    group: ikiwiki
    recurse: true
- name: Copy supervisor config
  template:
    src: supervisord.conf
    dest: /etc/supervisor/conf.d/ikiwiki.conf
- name: Start lighttpd
  service:
    name: lighttpd
    state: started
- name: Set up SSH authentication
  tags: ssh
  block:
    - name: Copy key
      template:
        src: "{{ docker_ssh_key }}"
        dest: "/home/ikiwiki/.ssh/authorized_keys2"
        mode: 0600
    - name: Change ownership
      file:
        path: "/home/ikiwiki/.ssh"
        owner: ikiwiki
        group: ikiwiki
        recurse: true
  when: docker_ssh_key is defined