--- - name: install cgit and fcgiwrap apt: name: - cgit - python3-pygments - fcgiwrap state: present ### TODO: this might break stuff.. - name: mask default fcgiwrap systemd units loop: - socket - service systemd: name: "fcgiwrap.{{ item }}" state: stopped masked: yes - name: install fcgiwrap systemd units loop: - socket - service template: src: "fcgiwrap.{{ item }}.j2" dest: "/etc/systemd/system/fcgiwrap-gitolite-{{ gitolite_instance }}.{{ item }}" - name: make sure fcgiwrap systemd socket unit is enabled and started systemd: daemon_reload: yes name: "fcgiwrap-gitolite-{{ gitolite_instance }}.socket" state: started enabled: yes - name: generate cgitrc template: src: cgitrc.j2 dest: "{{ gitolite_base_path }}/{{ gitolite_instance }}/cgitrc" - name: install custom logo when: "'logo' in gitolite_instances[gitolite_instance].http" block: - name: create logo base directory file: path: /usr/local/share/cgit state: directory - name: copy logo file copy: src: "{{ gitolite_instances[gitolite_instance].http.logo }}" dest: "/usr/local/share/cgit/{{ gitolite_instance }}.png" - name: install nginx vhost vars: nginx_vhost: name: "gitolite-{{ gitolite_instance }}" acme: true hostnames: "{{ gitolite_instances[gitolite_instance].http.hostnames }}" content: "{{ lookup('template', 'nginx-vhost.conf.j2') }}" include_role: name: nginx/vhost