From 62327b88c0e6702821c7bb097cc9c7d7326a3e96 Mon Sep 17 00:00:00 2001 From: James Hackett Date: Thu, 8 Dec 2022 23:00:18 +0000 Subject: [PATCH] adds some useful scripts --- ansible/bin/get-changed-apt.sh | 3 +++ ansible/bin/ping.sh | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 ansible/bin/get-changed-apt.sh create mode 100644 ansible/bin/ping.sh diff --git a/ansible/bin/get-changed-apt.sh b/ansible/bin/get-changed-apt.sh new file mode 100644 index 0000000..5819060 --- /dev/null +++ b/ansible/bin/get-changed-apt.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +ansible -m shell -i hosts all -a "cmd='grep -E \"^$(date +%Y-%m-%d).+ (install|upgrade) \" /var/log/dpkg.log | cut -d \" \" -f 3-5'" diff --git a/ansible/bin/ping.sh b/ansible/bin/ping.sh new file mode 100644 index 0000000..4b7625f --- /dev/null +++ b/ansible/bin/ping.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +ansible -i hosts all -m ping