---
- name: Sync image registry cert file to remote
  tags: ["certs"]
  copy:
    src: |
      {{ .work_dir }}/kubekey/pki/image_registry.crt
    dest: |
      /opt/registry/{{ .registry_version }}/ssl/server.crt

- name: Sync image registry key file to remote
  tags: ["certs"]
  copy:
    src: |
      {{ .work_dir }}/kubekey/pki/image_registry.key
    dest: |
      /opt/registry/{{ .registry_version }}/ssl/server.key

- name: Restart registry service
  tags: ["certs"]
  command: systemctl restart registry.service
