Skip to content
Snippets Groups Projects
Select Git revision
  • 71d093d586cf182f24ef16094e9239172f6a1918
  • master default
  • v1
  • btrfs-backup
4 results

ansible.cfg

Blame
  • cgit.yml 2.33 KiB
    ---
    # tasks file for cgit
    - name: APT install cgit
      apt:
        name: ['cgit', 'python-docutils']
        state: present
        update_cache: yes
        cache_valid_time: 3600
    
    - name: Allow Apache to access to gitolite repositories
      user:
        append: yes
        name: www-data
        groups: git
        state: present
      notify:
      - Restart Apache
    
    - name: Enable CGI Apache module (always changes)
      apache2_module:
        name: cgid
        state: present
      notify:
      - Restart Apache
    
    - name: Add symlink for rst2html (workaround, bug fixed in Stretch)
      file:
        src: /usr/share/docutils/scripts/python2/rst2html
        dest: /usr/local/bin/rst2html.py
        owner: root
        group: root
        state: link
    
    - name: Configure cgit
      lineinfile:
        dest: /etc/cgitrc
        line: '{{ item.line }}'
        regexp: '{{ item.regexp|default(omit) }}'
        insertbefore: '{{ item.insertbefore|default(omit) }}'
      with_items:
      - line: 'css=/cgit/css/cgit.css'
        regexp: '^css='
      - line: 'logo=/cgit/css/cgit.png'
        regexp: '^logo='
      - line: 'favicon=/cgit/css/favicon.ico'
        regexp: '^favicon='
      - line: 'about-filter=/usr/lib/cgit/filters/about-formatting.sh'
        regexp: '^about-filter='
        insertbefore: 'scan-path='
      - line: 'enable-git-config=1'
        regexp: '^enable-git-config='
      - line: 'remove-suffix=1'
        regexp: '^remove-suffix='
        insertbefore: 'scan-path='
      - line: 'project-list=/srv/git/projects.list'
        regexp: 'project-list='
        insertbefore: 'scan-path='
      - line: 'scan-path=/srv/git/repositories'
        regexp: 'scan-path='
      - line: 'readme=:README.md'
      - line: 'readme=:readme.md'
      - line: 'readme=:README.mkd'
      - line: 'readme=:readme.mkd'
      - line: 'readme=:README.rst'
      - line: 'readme=:readme.rst'
      - line: 'readme=:README.html'
      - line: 'readme=:readme.html'
      - line: 'readme=:README.htm'
      - line: 'readme=:readme.htm'
      - line: 'readme=:README.txt'