<NME> clean.sh
<BEF> ADDFILE
<MSG> Adding docker clean.sh

<DFF> @@ -0,0 +1,24 @@
+#!/bin/bash
+## Action for Automatron to remove all running containers and images
+
+echo "Cleaning running containers"
+echo "-------------------------------"
+for CONTAINER in `/usr/bin/docker ps -qa`
+do
+  /usr/bin/docker rm --force $CONTAINER
+done
+echo "-------------------------------"
+echo "Done"
+
+
+echo "-------------------------------"
+
+
+echo "Cleaning docker images"
+echo "-------------------------------"
+for IMAGE in `/usr/bin/docker images -q`
+do
+  /usr/bin/docker rmi --force $IMAGE
+done
+echo "-------------------------------"
+echo "Done"

{'commit': 'diff --git a/config/runbooks/base/memory_free/init.yml b/config/runbooks/base/memory_free/init.yml\nindex f84fe0e..13336d9 100644\n--- a/config/runbooks/base/memory_free/init.yml\n+++ b/config/runbooks/base/memory_free/init.yml\n@@ -4,10 +4,11 @@ nodes:\n   - "*"\n checks:\n   mem_free:\n+    # Check for the % of memory free create warning with 20% free and critical for 10% free\n     execute_from: ontarget\n     type: plugin\n     plugin: systems/mem_free.py\n-    args: --threshold-perc=20\n+    args: --warn=20 --critical=10\n actions:\n   capture_memusage:\n     execute_from: ontarget\ndiff --git a/plugins/actions/docker/clean.sh b/plugins/actions/docker/clean.sh\nnew file mode 100644\nindex 0000000..1dade9b\n--- /dev/null\n+++ b/plugins/actions/docker/clean.sh\n@@ -0,0 +1,24 @@\n+#!/bin/bash\n+## Action for Automatron to remove all running containers and images\n+\n+echo "Cleaning running containers"\n+echo "-------------------------------"\n+for CONTAINER in `/usr/bin/docker ps -qa`\n+do\n+  /usr/bin/docker rm --force $CONTAINER\n+done\n+echo "-------------------------------"\n+echo "Done"\n+\n+\n+echo "-------------------------------"\n+\n+\n+echo "Cleaning docker images"\n+echo "-------------------------------"\n+for IMAGE in `/usr/bin/docker images -q`\n+do\n+  /usr/bin/docker rmi --force $IMAGE\n+done\n+echo "-------------------------------"\n+echo "Done"\n', 'commit_subject': 'Adding docker clean.sh', 'repo_name': 'madflojo/automatron', 'committer': {'name': 'madflojo', 'email': '73675debcd8a436be48ec22211dcf44fe0df0a64@bencane.com', 'time_sec': '1464670692', 'tz_offset': '-420', 'date': {'seconds': '1464670692'}}, 'commit_tree': '2756433cdcb05b17b647aace0b0c092e150ac526', 'commit_message': 'Adding docker clean.sh\n', 'language_name': 'Shell', 'license': 'apache-2.0', 'hunks': '@@ -0,0 +1,24 @@\n+#!/bin/bash\n+## Action for Automatron to remove all running containers and images\n+\n+echo "Cleaning running containers"\n+echo "-------------------------------"\n+for CONTAINER in `/usr/bin/docker ps -qa`\n+do\n+  /usr/bin/docker rm --force $CONTAINER\n+done\n+echo "-------------------------------"\n+echo "Done"\n+\n+\n+echo "-------------------------------"\n+\n+\n+echo "Cleaning docker images"\n+echo "-------------------------------"\n+for IMAGE in `/usr/bin/docker images -q`\n+do\n+  /usr/bin/docker rmi --force $IMAGE\n+done\n+echo "-------------------------------"\n+echo "Done"\n', 'addition_count': 24, 'deletion_count': 0, 'src_file': '/dev/null', 'tgt_file': 'b/plugins/actions/docker/clean.sh', 'file_extension': '.sh', 'before_file': 'ADDFILE', 'message': 'Adding docker clean.sh\n', 'author_name': 'madflojo', 'lang': 'sh'}