| DOCKER_ENGINE="docker-engine" |
| DOCKER_REGISTRY="/docker-registry /docker-registry-mirror" |
| CONTAINER_LIST=$(docker ps -qa) |
| CONTAINER_LIST=$(docker ps --format '{{.ID}} {{.Names}}' | grep -v ' registry$' | grep -v ' registry-mirror$' | awk '{print $1}') |
| CONTAINER_LIST=$(docker ps --format '{{.ID}} {{.Names}}' | grep -v ' registry$' | grep -v ' registry-mirror$' | awk '{print $1}') |
| docker kill $CONTAINER_LIST |
| docker rm -f $CONTAINER_LIST |
| if [ $KEEP_DOCKER -eq 0 ]; then |
| docker rmi -f $(docker images -aq) |
| sudo apt-get remove --purge -y bind9 apache2 $DOCKER_ENGINE ansible $(dpkg --get-selections | grep maas | cut -f1) |
| /etc/apt/apt.conf.d/02apt-cacher-ng \ |
| /etc/apt/sources.list.d/apt_dockerproject_org_repo.list \ |
| /etc/apt/sources.list.d/ppa_juju_stable_trusty.list \ |
| /etc/apt/sources.list.d/docker.list \ |
| /etc/apt/sources.list.d/ppa_maas_stable_trusty.list \ |
| /etc/apt/sources.list.d/ppa_ansible_ansible_trusty.list \ |
| /etc/network/if-pre-up.d/nat \ |
| sudo iptables --table nat --delete POSTROUTING --out-interface eth3 -j MASQUERADE |
| sudo iptables --delete FORWARD --in-interface mgmtbr -j ACCEPT |