--- - name: Install auto update script for {{ name }} template: src: "update.sh" dest: "{{ update_script_path }}" owner: root group: root mode: "u=rwx,g=rx,o=r" - name: Create repository directory for {{ name }} file: path: "{{ dest }}" state: directory owner: "{{ owner }}" group: "{{ group }}" mode: "{{ mode }}" - name: Clone repository to {{ dest }} command: "{{ update_script_path }}" args: creates: "{{ dest }}/.git" - name: Enable auto update of {{ name }} cron: hour: 2 minute: 0 job: "{{ update_script_path }}" name: "{{ cron_name }}" state: present