--- - name: install git server packages package: name: "{{ item }}" state: installed with_items: - gitweb - highlight - perl-Digest-MD5 - name: fix selinux context from data directory sefcontext: path: /export/git(/.*)? setype: git_sys_content_t - name: create git directory file: path: /srv/git src: /export/git state: link owner: root group: root - name: create gitweb config copy: dest: /etc/gitweb.conf src: gitweb.conf mode: 0644 owner: root group: root - name: create robots.txt copy: dest: /var/www/git/robots.txt content: "User-agent: *\nDisallow:\n" mode: 0644 owner: root group: "{{ ansible_wheel }}" - name: copy local layout files copy: dest: "/var/www/git/static/{{ item }}" src: "{{ item }}" mode: 0644 owner: root group: root with_items: - logo.png - gitweb-local.css - name: create apache git config copy: dest: /etc/httpd/conf.local.d/git.conf src: git.conf mode: 0644 owner: root group: "{{ ansible_wheel }}" notify: restart apache