No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

cgit.yml 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. - name: Install cgit dependencies
  2. apt: pkg={{ item }} state=installed
  3. with_items:
  4. - groff
  5. - libssl-dev
  6. - python3-pip
  7. tags:
  8. - dependencies
  9. - name: Install cgit pip dependencies python 3
  10. pip:
  11. name: "{{ item }}"
  12. executable: pip3
  13. with_items:
  14. - docutils
  15. - pygments
  16. - markdown
  17. - name: Download cgit release
  18. get_url: url=http://git.zx2c4.com/cgit/snapshot/cgit-{{ cgit_version }}.tar.xz
  19. dest=/root/cgit-{{ cgit_version }}.tar.xz
  20. - name: Decompress cgit source
  21. unarchive: src=/root/cgit-{{ cgit_version }}.tar.xz
  22. dest=/root copy=no
  23. creates=/root/cgit-{{ cgit_version }}/configure
  24. - name: Build and install cgit
  25. shell: make get-git ; make ; make install
  26. executable=/bin/bash
  27. chdir=/root/cgit-{{ cgit_version }}
  28. creates=/var/www/htdocs/cgit/cgit.cgi
  29. - name: Copy cgitrc
  30. template: src=etc_cgitrc.j2 dest=/etc/cgitrc
  31. group=www-data
  32. owner=root
  33. - name: Rename existing Apache cgit virtualhost
  34. command: mv /etc/apache2/sites-available/cgit /etc/apache2/sites-available/cgit.conf removes=/etc/apache2/sites-available/cgit
  35. - name: Remove old sites-enabled/cgit symlink (new one will be created by a2ensite)
  36. file: path=/etc/apache2/sites-enabled/cgit state=absent
  37. - name: Configure the Apache HTTP server for cgit
  38. template: src=etc_apache2_sites-available_cgit.j2
  39. dest=/etc/apache2/sites-available/cgit.conf
  40. group=root
  41. owner=root
  42. - name: Enable Apache CGI module
  43. command: a2enmod cgi creates=/etc/apache2/mods-enabled/cgi.load
  44. notify: restart apache
  45. - name: Enable Apache rewrite module
  46. command: a2enmod rewrite creates=/etc/apache2/mods-enabled/rewrite.load
  47. notify: restart apache
  48. - name: Enable cgit site
  49. command: a2ensite cgit.conf creates=/etc/apache2/sites-enabled/cgit.conf
  50. notify: restart apache