projects
/
ansible.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9f8c461
)
add do-update script
author
Ralf Jung
<post@ralfj.de>
Thu, 10 May 2018 07:08:04 +0000
(09:08 +0200)
committer
Ralf Jung
<post@ralfj.de>
Thu, 10 May 2018 07:08:04 +0000
(09:08 +0200)
do-update
[new file with mode: 0755]
patch
|
blob
diff --git a/do-update
b/do-update
new file mode 100755
(executable)
index 0000000..
f99450c
--- /dev/null
+++ b/
do-update
@@ -0,0
+1,11
@@
+#!/bin/bash
+cd "$(dirname "$(readlink -e "$0")")"
+for HOST in "$@"; do
+ echo "Playing on $HOST"
+ ansible-playbook upgrade.yml -l "$HOST"
+ read -p "Do you want me to reboot? (y/N) " ANSWER
+ if [[ "$ANSWER" == y* ]]; then
+ ansible "$HOST" -a "shutdown -r +1"
+ fi
+ echo
+done