infra/ansible/run.sh
Graham McIntire 5e8823f4dd
fix: resolve all logic bugs
- Remove duplicate firewall include_role from base role (#18)
- Move remote_user from [ssh_connection] to [defaults] in ansible.cfg (#20)
- Add set -euo pipefail to run.sh (#21)
- Delete orphaned playbook_handlers.yml (#22)
- Fix changed_when: true in debian tasks (#23)
- Add tailscale_authkey env var lookup with TAILSCALE_KEY fallback (#25)
- Document -K requirement in bootstrap.yml (#26)
- Replace bare ansible_host=mail/git with IP addresses (#27)
- Update findings.md
2026-06-04 14:43:06 -05:00

20 lines
502 B
Bash
Executable file

#!/bin/bash
set -euo pipefail
if [[ -z ${ANSIBLE_SETUP_OPTIONS} ]]; then
ANSIBLE_SETUP_OPTIONS="all"
fi
if [[ -z ${SKIP_SETUP} ]]; then
echo "> Running setup (with ${ANSIBLE_SETUP_OPTIONS})..."
ansible -m setup -o all 2>&1 | awk -F'=' '{ print $1 }'
fi
if [[ -z ${SKIP_PLAYBOOK} ]]; then
if [[ -z ${ANSIBLE_OPTIONS} ]]; then
ANSIBLE_OPTIONS="playbook.yml"
fi
echo "> Running playbook (with ${ANSIBLE_OPTIONS})..."
ansible-playbook ${ANSIBLE_OPTIONS} | tee ansible-playbook.log
fi