blob: 4cfd5529163a8f60a14f3fbd446dd38f914c9d3e [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','') }}"
Zack Williamsa2763112017-01-03 11:38:38 -07009 project_src: "{{ cord_profile_dir }}"
Zack Williamsa2763112017-01-03 11:38:38 -070010 state: absent
11 remove_images: local
12 ignore_errors: yes
13
14# need to remove images using docker_images here?
15
16- name: Remove docker networks
17 docker_network:
18 name: "{{ item }}"
19 state: absent
20 with_items: "{{ xos_docker_networks }}"
21 ignore_errors: yes
22
23- name: Remove the cord_profile directory
24 file:
25 path: "{{ cord_profile_dir }}"
26 state: absent
27 ignore_errors: yes
Andy Bavier07929882017-03-26 13:21:30 -040028 when: delete_cord_profile_dir