aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2016-03-25 11:50:50 -0700
committerbnewbold <bnewbold@robocracy.org>2016-03-25 11:50:50 -0700
commit2ae4ca234272c862988a6c7685f89493186d8890 (patch)
treed27ade2dcaa052b900be503cdeb7f73da8c6923c
parente5195b9e64f35e69d657398998b8ac994c99a10a (diff)
downloadinfra-2ae4ca234272c862988a6c7685f89493186d8890.tar.gz
infra-2ae4ca234272c862988a6c7685f89493186d8890.zip
scripts
-rwxr-xr-xcheck_all.sh8
-rwxr-xr-xping_all.sh3
-rwxr-xr-xupdate_all.sh4
3 files changed, 15 insertions, 0 deletions
diff --git a/check_all.sh b/check_all.sh
new file mode 100755
index 0000000..d8281e1
--- /dev/null
+++ b/check_all.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+# This script shows how to run a single command on all hosts; here to check libc version installed
+echo "### Check libc6 version with 'command' and 'apt' (fails on wheezy)"
+ansible -o -f 8 -i hosts all -m command -a "apt list libc6 -q"
+
+echo "### Check openssl version with 'shell' module"
+ansible -o -f 8 -i hosts all -m shell -a "openssl version -a | head -n 1"
diff --git a/ping_all.sh b/ping_all.sh
new file mode 100755
index 0000000..ce0af43
--- /dev/null
+++ b/ping_all.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+ansible -o -f 8 -i hosts all -m ping
diff --git a/update_all.sh b/update_all.sh
new file mode 100755
index 0000000..a5490ae
--- /dev/null
+++ b/update_all.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+ansible -o -f 8 -i hosts all -m apt -a "update_cache=yes upgrade=safe"
+