# build the docker image $docker build # set the VAULT enviornment details as per your setup export VAULT_ADDR= export VAULT_TOKEN= # command execution to run the playbook via the dockerised ansible command $ docker run --rm -e VAULT_TOKEN=$VAULT_TOKEN -e VAULT_ADDR=$VAULT_ADDR -v /home/vdo023/dev/ans_vault_access:/home ansible:local ansible-playbook -i "localhost," /home/playbook-access_vault_key.yml