ansible/roles/mirror/sync/tasks/main.yml
2023-10-12 18:32:40 +00:00

24 lines
601 B
YAML

---
- name: Create config for {{ mirror_label }}
ansible.builtin.template:
dest: "/etc/sync-mirrors/{{ mirror_label }}.conf"
src: mirror.conf.j2
mode: "0644"
owner: root
group: root
- name: Create target directory
ansible.builtin.file:
path: "/srv/mirrors/{{ mirror_label }}"
state: directory
mode: "0755"
owner: mirror
group: mirror
- name: Link target directory to web
ansible.builtin.file:
path: "/srv/web/{{ inventory_hostname }}/{{ mirror_label }}"
src: "/srv/mirrors/{{ mirror_label }}"
state: link
owner: mirror
group: mirror