zot/tasks/config.yaml
Simon Cornet 84a0e2dcf7
All checks were successful
ci/woodpecker/push/linting Pipeline was successful
chore: use ansible_facts
2026-05-19 09:04:26 +02:00

37 lines
1,015 B
YAML

---
# configure zot
- name: "configure zot"
block:
# create sync credentials file
- name: "create sync credentials file"
ansible.builtin.template:
src: "zot/sync-credentials.json.j2"
dest: "/etc/zot/sync-credentials.json"
owner: "root"
group: "root"
mode: "0600"
notify: "restart zot"
when: "zot_sync_credentials is defined and zot_sync_credentials | length > 0"
# create config file
- name: "create config file"
ansible.builtin.template:
src: "zot/config.json.j2"
dest: "/etc/zot/config.json"
owner: "root"
group: "root"
mode: "0600"
notify: "restart zot"
# create systemd service
- name: "create systemd service"
ansible.builtin.template:
src: "zot/zot.service.j2"
dest: "/etc/systemd/system/zot.service"
owner: "root"
group: "root"
mode: "0644"
notify: "restart zot"
when: "ansible_facts['os_family'] == 'Debian'"