add tools for syncing thinlinc packages and enable it on mirror group

This commit is contained in:
Timo Makinen 2019-05-11 01:59:18 +03:00
parent 278f2deb92
commit 79dd378265
3 changed files with 74 additions and 0 deletions

View file

@ -0,0 +1,32 @@
---
- 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: 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