X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=playbooks%2Fdebian-init-system.sh;h=d53c6a55c38c50c2e84376515106770adfdcb3ae;hb=a25c68ad3932c2ca7f1612be4c95286f6bce23b8;hp=0e5f1515fe73b6f76d1ec311150cc50aaaf41157;hpb=dcf965cb65e4c89e7db4f86453dfcbf9af9a967a;p=ansible.git diff --git a/playbooks/debian-init-system.sh b/playbooks/debian-init-system.sh index 0e5f151..d53c6a5 100755 --- a/playbooks/debian-init-system.sh +++ b/playbooks/debian-init-system.sh @@ -1,7 +1,17 @@ #! /bin/sh +if [ -z "$1" ]; then + echo "Usage: $0 host" >&2 + exit 1 +fi + +host="$1" +shift + cd "`dirname \"$0\"`" && # Passwordless access isn't configured yet; use `ssh` connection sharing. # `sudo` isn't configured yet too; use `su` and ask for root password. -exec ansible-playbook debian/init-system.yml "$@" --become-method=su -Kv +ansible-playbook debian/init-system.yml "$@" -e hosts="$host" \ + --become-method=su -K && +exec ansible-playbook debian/init-system2.yml "$@" -e hosts="$host"