From 2d31b45fcefd19928fa3427b2cfee87d4675fbb1 Mon Sep 17 00:00:00 2001 From: AndreasNefeli Date: Mon, 25 Jan 2021 20:21:00 +0000 Subject: [PATCH] Upload files to '' --- run.sh | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 run.sh diff --git a/run.sh b/run.sh new file mode 100644 index 0000000..12309e5 --- /dev/null +++ b/run.sh @@ -0,0 +1,5 @@ +echo "[service]" > inventory.yml +my_ip=$(ifconfig eth0 | grep 'inet' | cut -d: -f2 | awk '{print $2}') +my_ip1=$(echo $my_ip | sed 's/.[0-9]$/.*/') +nmap -sP -oG - $my_ip1 | grep Up | cut -d ' ' -f2 | tail -n +2 >> inventory.yml +ansible-playbook -u docker -i inventory.yml test.yml -f 5 --ask-pass --ask-become-pass