blob: 362a6258c760b08935294b2b8d99a6d0a433402d [file] [log] [blame]
Zack Williamsa2763112017-01-03 11:38:38 -07001---
2# teardown-profile/tasks/main.yml
3# Destroys the currently created profile
4# NOTE: ignoring errors so that incomplete builds can be removed
5
6- name: Stop and remove XOS containers
7 docker_service:
8 project_name: "{{ cord_profile | regex_replace('\\W','') }}"
9 project_src: "{{ cord_profile_dir }}/onboarding-docker-compose/"
10 state: absent
11 remove_images: local
12 ignore_errors: yes
13
14- name: Stop and remove XOS bootstrap containers
15 docker_service:
16 project_name: "{{ cord_profile | regex_replace('\\W','') }}bs"
17 project_src: "{{ cord_profile_dir }}"
18 files: "xos-bootstrap-docker-compose.yaml"
19 state: absent
20 remove_images: local
21 ignore_errors: yes
22
23# need to remove images using docker_images here?
24
25- name: Remove docker networks
26 docker_network:
27 name: "{{ item }}"
28 state: absent
29 with_items: "{{ xos_docker_networks }}"
30 ignore_errors: yes
31
32- name: Remove the cord_profile directory
33 file:
34 path: "{{ cord_profile_dir }}"
35 state: absent
36 ignore_errors: yes
Andy Bavier07929882017-03-26 13:21:30 -040037 when: delete_cord_profile_dir