---
- name: "ποΈ Remove the URL-named launcher checkout"
ansible.builtin.file:
path: "{{ [ DISCOURSE_SERVICES_DIR, DISCOURSE_REPOSITORY_LEGACY_RELPATH ] | path_join }}"
state: absent
- name: "ποΈ Prune the emptied parents of the URL-named checkout"
ansible.builtin.command:
argv:
- rmdir
- --ignore-fail-on-non-empty
- --parents
- "{{ DISCOURSE_REPOSITORY_LEGACY_RELPATH | dirname }}"
chdir: "{{ DISCOURSE_SERVICES_DIR }}"
removes: "{{ [ DISCOURSE_SERVICES_DIR, DISCOURSE_REPOSITORY_LEGACY_RELPATH | dirname ] | path_join }}"
when: DISCOURSE_REPOSITORY_LEGACY_RELPATH is search('/')