Ansible-等待用户键入远程机器上的交互式脚本的值 [英] Ansible - wait for user to key in value for interactive scripts on remote machine
问题描述
我希望Ansible在命令行中等待在远程计算机上运行的交互式脚本的输入.随着互动问题的不断变化,期望"将无法满足我的要求.
I would like the ansible to wait for my input in the command line for interactive script running in remote machine. "Expect" will not suite my requirement as the interactive questions keep changing.
例如 xxx.pl 这必须是正在运行服务的用户. [root:root]':y ---->应该允许我实时更改 处理公用事业? [/usr/bin]:y --->与此相同
eg xxx.pl This must be the user which is running service. [root:root]': y ----> i should be allowed to change in realtime handling utilities? [/usr/bin]: y ---> same with this
推荐答案
Ansible无法做到这一点.
This is not possible with Ansible.
Ansible在将其发送给远程主机执行之前会打包所有任务脚本/参数,并且(从Ansible 2.4版本开始)无法获得任务执行过程中的任何反馈-仅任务的最终结果.
Ansible packs all task scripts/parameters before sending it for execution to remote host and there is no way (as of Ansible 2.4) to get any feedback during task execution – only final result of task.
这篇关于Ansible-等待用户键入远程机器上的交互式脚本的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!