在Ansible中,我如何等待30秒或用户交互?
我现在有以下的剧本:
- name: "Test"
hosts: localhost
tasks:
- name: wait
wait_for:
timeout: 30但你不能按回车取消等待时间。
我还没有成功地尝试以下解决方案:
- name: "Test"
hosts: localhost
tasks:
- name: wait
wait_for:
pause:
prompt: Press return to continue. Press Ctrl+c and then "a" to abort
timeout: 30但是,对wait_for来说,暂停并不是一种有效的选择。
发布于 2021-10-25 12:09:31
文件上说:
如果希望将暂停提前到设置为过期,或者需要完全中止播放簿运行,则可以使用ctrl+c。继续早期按ctrl+c,然后按c。若要中止一个剧本,请按ctrl+c,然后按一个。
https://stackoverflow.com/questions/69707493
复制相似问题