ansible/roles/docker-distribution/tasks/main.yml
Kevin Fenzi 438375f518 registry / logrotate: replace the rsyslog file, not syslog
We use rsyslog, the syslog file has no effect.
If we overrite rsyslog we get the effect we want (daily logrotate with
xz compression).

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-01-11 11:26:52 -08:00

55 lines
1.2 KiB
YAML

---
# tasks file for docker-distribution
- name: install docker-distribution
action: "{{ ansible_pkg_mgr }} name=docker-distribution state=present"
tags:
- docker-distribution
- name: start and enable docker-distribution
service: name=docker-distribution state=started enabled=yes
tags:
- docker-distribution
- name: configure docker-distribution
template:
src: config.yml.j2
dest: "{{ conf_path }}"
notify: restart docker-distribution
tags:
- docker-distribution
- name: ensure docker certs dir exists
file:
path: "{{ cert.dest_dir }}"
state: directory
when: tls.enabled
tags:
- docker-distribution
- debug: var=cert
tags:
- docker-distribution
- name: install tls cert for docker
copy:
src: "{{ cert.cert_src }}"
dest: "{{ cert.dest_dir}}/{{ cert.cert_dest }}"
when: tls.enabled
tags:
- docker-distribution
- name: install tls key for docker
copy:
src: "{{ cert.key_src }}"
dest: "{{ cert.dest_dir}}/{{ cert.key_dest }}"
when: tls.enabled
tags:
- docker-distribution
- name: override the default syslog logrotate file
copy:
src=syslog-logrotate
dest=/etc/logrotate.d/rsyslog
tags:
- docker-distribution