image = "docker.io/library/debian:trixie-slim"
only_branches = ["refs/heads/master"]
secrets = ["vault_password", "deploy_ssh_key", "deploy_ssh_key.pub"]
-env = { ANSIBLE_FORCE_COLOR = "0", ANSIBLE_NOCOWS = "1" }
+env = { ANSIBLE_FORCE_COLOR = "0", ANSIBLE_NOCOWS = "1", DEBIAN_FRONTEND = "noninteractive" }
command = """
set -e
apt-get -qq update
apt-get -qq install -y --no-install-recommends ansible-core openssh-client git >/dev/null
+# authorized_key is the only module the playbook uses outside ansible-core
+ansible-galaxy collection install ansible.posix >/dev/null
cd deploy
export ANSIBLE_SSH_COMMON_ARGS="-o UserKnownHostsFile=$PWD/known_hosts -o IdentitiesOnly=yes"
ansible-playbook -i hosts deploy.yml -D \\
[ "$(pwd | rev | cut -d/ -f1 | rev)" == "deploy" ] || pushd deploy || exit
# shellcheck disable=SC1090
-source "${HOME}/.virtualenvs/ansible/bin/activate"
+# source "${HOME}/.virtualenvs/ansible/bin/activate"
export ANSIBLE_VAULT_PASSWORD_FILE=vault.sh
#!/bin/bash
-# TODO: parse amqp_uri, insert here
-while ! echo > /dev/tcp/localhost/5672; do
+while ! echo > /dev/tcp/{{ amqp_uri | urlsplit('hostname') }}/{{ amqp_uri | urlsplit('port') or 5672 }}; do
echo "waiting for remote service..."
sleep 5s
done