summaryrefslogtreecommitdiff
path: root/myansible.sh
blob: 1e4d15b30abdc6d0806718ac651daa66712f38e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash -x

## wrapper for ansible, ensuring password is provided

if ! ssh-add -l >/dev/null; then
ssh-add ~/.ssh/ansible \
  ~/.ssh/id_hetz \
  ~/.ssh/id_netcup \
  ~/.ssh/id_rsa \
  ~/.ssh/firstroot \
  ~/.ssh/gcloud \
  ~/.ssh/virtuacloud \
  ~/.ssh/ifog_otter
fi

./venv/bin/ansible-playbook --ask-vault-pass -e '@passwd.yml' $@
# -B / -P for background/polling