---
- name: Extract Caddy
  ansible.builtin.unarchive:
    src: "{{ caddy_home }}/caddy.tar.gz"
    dest: "{{ caddy_home }}"
    copy: false
    mode: 0644
    owner: "{{ caddy_user }}"
    group: "{{ caddy_user_details.group }}"
  when: caddy_binary_cache.changed
  tags: skip_ansible_lint

- name: Extract Caddy
  ansible.builtin.unarchive:
    src: "{{ caddy_home }}/caddy.tar.gz"
    dest: "{{ caddy_home }}"
    creates: "{{ caddy_home }}/caddy"
    copy: false
    mode: 0644
    owner: "{{ caddy_user }}"
    group: "{{ caddy_user_details.group }}"
