commit d6fca2f379ab400a719ca4d651a275628283ae95 parent 3ab3ccbcc2e1c390dfa9daa204309a890d2f3d4b Author: Devan Carpenter <devan@taler.net> Date: Mon, 18 Nov 2024 12:57:56 +0000 add script for local testing Diffstat:
| A | test.sh | | | 23 | +++++++++++++++++++++++ |
1 file changed, 23 insertions(+), 0 deletions(-)
diff --git a/test.sh b/test.sh @@ -0,0 +1,23 @@ +#!/bin/bash +set -exuo pipefail + +# Build our image +podman build -f Containerfile -t ansible-taler-test + +# Run in background (-d) with systemd init +podman run \ + --rm \ + --name ansible-taler-test \ + -p 127.0.0.1:8022:22 \ + --systemd=always \ + -d localhost/ansible-taler-test sh -c "exec /usr/sbin/init --show-status" + +# Print to log that container is running +podman ps + +# Clear out fingerprint from any past runs +ssh-keygen -f "$HOME/.ssh/known_hosts" -R "[127.0.0.1]:8022" + +# Run our playbook(s) +# NOTE: Trailing comma is correct (and required) in agument for -i flag +ansible-playbook --verbose -i 127.0.0.1:8022, --user root playbooks/setup.yml