aboutsummaryrefslogblamecommitdiffstats
path: root/roles/cgit/tasks/main.yml
blob: 0f51d0c108e64e2e98728528ae409f35bb70fa71 (plain) (tree)





















                                                    

                                        




















                                                     
- name: install cgit packages
  package:
    name:
      - cgit
      - lowdown
    state: present

- name: generate cgit configuration files
  template:
    src: "{{ item.template }}"
    dest: "{{ item.file }}"
    owner: 0
    group: 0
    mode: 0644
  loop:
    - template: cgitrc.j2
      file: "{{ cgit_chroot_dir }}/conf/cgitrc"
    - template: footer.html.j2
      file: "{{ cgit_chroot_dir }}/conf/footer.html"
    - template: httpd.conf.j2
      file: /etc/httpd.d/cgit.conf

- name: include dependencies for lowdown
  include_tasks: dependencies.yml

- name: copy about-filter generator
  copy:
    src: about-filter.sh
    dest: "{{ cgit_chroot_dir }}/bin/about-filter.sh"
    owner: 0
    group: 0
    mode: 0755

- name: start and enable slowcgi service
  service:
    name: slowcgi
    state: restarted
    enabled: true

- name: httpd password information
  debug:
    msg: |
      Please provide a password using htpasswd,
      in "{{ cgit_chroot_dir }}/htpasswd/cgit"
  when: cgit_authenticate
remember that computers suck.