# stagit ~~ roles/stagit/tasks/main.yml # Init git user and settings --- - name: ensure stagit is installed package: name: stagit state: present - name: create stagit static-files directory file: path: "{{ stagit_htmldir }}" state: directory owner: www group: daemon mode: 0755 - name: copy static-page generation script copy: src: generate-static-git.sh dest: "{{ stagit_htmldir }}" owner: www group: "{{ group_root }}" mode: 0744 - name: copy stagit stylesheet copy: src: style.css dest: "{{ stagit_htmldir }}" owner: www group: "{{ group_root }}" mode: 0644 - name: ensure httpd.d directory exists file: path=/etc/httpd.d state=directory - name: copy httpd configuration copy: src: httpd.conf dest: /etc/httpd.d/stagit.conf owner: "{{ user_root }}" group: "{{ group_root }}" mode: 0644 - name: download default website logo get_url: url: http://rgoncalves.se/logo.png dest: "{{ stagit_htmldir }}/logo.png" owner: www group: "{{ group_root }}" mode: 0644 ignore_errors: true - name: enable cron job for static-page generation cron: name: "Static git-page generation" minute: "*/5" job: "cd {{ stagit_htmldir }} && ./generate-static-git.sh >/dev/null 2>&1" - name: execute static-page generation script once shell: ./generate-static-git.sh args: chdir: "{{ stagit_htmldir }}"