summaryrefslogblamecommitdiffstats
path: root/roles/wiki/tasks/docker.yml
blob: 2bfe61395712a224b1718c493c972d9900a8bdf3 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11



                                        

                  




                                       





                                      







                                             














                                                   
- 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