- name: Install required packages community.general.pacman: name: - cpio - lowdown state: present - name: Create site source folder file: owner: http group: http path: "/srv/web_source" state: directory recurse: yes register: site_perm - name: Fetch site source git: dest: "/srv/web_source" repo: "{{ site_repo }}" register: site_source become_user: http - name: Make site directory in web root file: group: http owner: http path: "{{ webroot }}/site/" state: directory register: site_folder - name: Deploy source to web root shell: cmd: "./ssg6 src {{ webroot }}/site/ 'dogeystamp' 'https://{{ domain }}/site'" chdir: /srv/web_source when: site_source.changed or site_folder.changed or site_perm.changed become_user: http - name: Cronjob to deploy source cron: user: http name: "Update and deploy website source" minute: 0 hour: "*/12" job: "git -C /srv/web_source/ pull && /srv/web_source/ssg6 /srv/web_source/src {{ webroot }}/site/ '{{ web_name }}' 'https://{{ domain }}/site'"