diff options
author | William Yeh <william.pjyeh@gmail.com> | 2016-05-30 11:46:11 +0800 |
---|---|---|
committer | William Yeh <william.pjyeh@gmail.com> | 2016-05-30 11:46:11 +0800 |
commit | f966242805e67f91bffdc5f9eb02096bb5e1f856 (patch) | |
tree | adbc4d5e7779f470dbf6e94b244ea33a9d9842d9 /mini-alpine3/uninstall-ansible.sh | |
parent | 84d31fd8edaec467b7a22c9fcf9b0f3097539e6a (diff) | |
download | docker-ansible-f966242805e67f91bffdc5f9eb02096bb5e1f856.tar.gz docker-ansible-f966242805e67f91bffdc5f9eb02096bb5e1f856.tar.zst docker-ansible-f966242805e67f91bffdc5f9eb02096bb5e1f856.zip |
Add: new `mini` series for building minimal images from playbooks.
Diffstat (limited to 'mini-alpine3/uninstall-ansible.sh')
-rwxr-xr-x | mini-alpine3/uninstall-ansible.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/mini-alpine3/uninstall-ansible.sh b/mini-alpine3/uninstall-ansible.sh new file mode 100755 index 0000000..173c51d --- /dev/null +++ b/mini-alpine3/uninstall-ansible.sh | |||
@@ -0,0 +1,26 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # Simple wrapper for uninstall ansible and related stuff. | ||
4 | # | ||
5 | |||
6 | |||
7 | echo "===> Removing Ansible..." | ||
8 | pip uninstall -y ansible | ||
9 | |||
10 | echo "===> Removing PIP packages..." | ||
11 | cat ___PIP_UNINSTALL_LIST | \ | ||
12 | while read ITEM; do | ||
13 | pip uninstall -y $ITEM | ||
14 | done | ||
15 | |||
16 | echo "===> Removing APK packages..." | ||
17 | cat ___APK_UNINSTALL_LIST | \ | ||
18 | while read ITEM; do | ||
19 | apk del $ITEM | ||
20 | done | ||
21 | |||
22 | |||
23 | echo "===> Cleaning up package list..." | ||
24 | rm -rf /var/lib/python2.7 /usr/lib/python2.7 | ||
25 | rm -rf /etc/ansible /root/.ansible /root/.cache /root/.ash_history | ||
26 | rm -rf /var/cache/apk | ||