Browse Source

Upload files to ''

master
AndreasNefeli 4 years ago
parent
commit
2d31b45fce
  1. 5
      run.sh

5
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
Loading…
Cancel
Save