I'm running a one-line script that should have multi-stage output:
#!/bin/bash
ansible-playbook deploy-master.yml -i ./inventories --private-key=$HOME/.ssh/id_rsa
however it won't show anything until its execution is finished (after which it will print all outputs of ansible-playbook). How do I fix this?
It seems like the easiest solution is to switch shebang line to:
I don't know the reason but it just worked.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.