--- - name: install required packages package: name: "{{ item }}" state: installed with_items: - unzip - createrepo_c - name: create target directory file: path: /srv/mirrors/thinlinc state: directory mode: 0755 owner: mirror group: mirror - name: link target directory file: dest: /srv/web/{{ inventory_hostname }}/thinlinc src: /srv/mirrors/thinlinc state: link owner: root group: "{{ ansible_wheel }}" follow: false - name: copy sync script copy: dest: /usr/local/bin/sync-thinlinc-repo src: sync-thinlinc-repo mode: 0755 owner: root group: root - name: create sync cron job cron: name: sync-thinlinc-repo hour: "4" minute: "5" job: /usr/local/bin/sync-thinlinc-repo user: mirror