homelab/metal/roles/pxe-cleanup/tasks/main.yml

8 lines
284 B
YAML

- name: Tear down PXE stack
ansible.builtin.command: "docker compose --project-name pxe down"
- name: Remove preseed files
file:
path: "{{ playbook_dir }}/roles/pxe-server/files/data/preseed/{{ hostvars[item]['mac'] }}.cfg"
state: "absent"
loop: "{{ groups['metal'] }}"