Change container workflow
Dockerfile workflow:
- Copy newly created file named
"playbook-execute.sh"
from repository to"/entrypoint.sh"
- Change
"WORKDIR"
to"/playbook-execution"
. - Set this file as entrypoint.
Entrypoint workflow:
- Copy playbook from mount path (
"/playbook"
) to"/playbook-execution"
directory. - Change directory to
"/playbook-execution"
. - Install roles using
ansible-galaxy
- assume that ssh-key is set using ssh-agent or mounted under proper directory ("/root/.ssh"
) - Execute
ansible-playbook
command passing all "entrypoint.sh
" parameters to this command.
Edited by Piotr Orzechowski