blob: 365c087fd65035c565536e58540b454989dbf061 [file] [log] [blame]
---
# teardown-profile/tasks/main.yml
# Destroys the currently created profile
# NOTE: ignoring errors so that incomplete builds can be removed
- name: Stop and remove XOS containers
docker_service:
project_name: "{{ cord_profile | regex_replace('\\W','') }}"
project_src: "{{ head_cord_profile_dir }}"
state: absent
remove_images: local
ignore_errors: yes
# need to remove images using docker_images here?
- name: Remove docker networks
docker_network:
name: "{{ item }}"
state: absent
with_items: "{{ xos_docker_networks }}"
ignore_errors: yes
- name: Remove the cord_profile directory
file:
path: "{{ head_cord_profile_dir }}"
state: absent
ignore_errors: yes
when: delete_cord_profile_dir