Open apenella opened 1 year ago
problem line: https://github.com/apenella/go-ansible/blob/master/pkg/playbook/ansiblePlaybook.go#L135
workarround:
./ansible-playbook.sh
#!/bin/sh
# @see https://hub.docker.com/r/alpine/ansible
exec docker run --rm -v $(pwd)/source:/source -w /source alpine/ansible ansible-playbook "$@"
test: ./ansible-playbook.sh --help
Binary
file in your project playbook := &playbook.AnsiblePlaybookCmd{
....
Binary: "./ansible-playbook.sh",
....
}
I tried used alias but aliases are a shell construct. They aren't passed to sub processes. :(
Hi @kolcak Thank you very much for your workaround! The idea I have is to provide a solution that does not require an intermediate script but I will do a further evaluation when I tackle that feature. Meanwhile, I keep your approach as a plan B.
Thanks!
What Execute ansible command inside a container