Ansible - 等待用户为远程机器上的交互式脚本键入值

Ansible - wait for user to key in value for interactive scripts on remote machine

我希望 ansible 等待我在命令行中输入远程机器中的交互式脚本 运行。 "Expect" 不符合我的要求,因为互动问题不断变化。

例如 xxx.pl 这必须是 运行 服务的用户。 [root:root]': y ----> i 应该允许实时更改 处理公用事业? [/usr/bin]: y ---> 与此相同

Ansible 做不到这一点。

Ansible 在将所有任务发送到远程主机执行之前打包所有任务 scripts/parameters 并且没有办法(从 Ansible 2.4 开始)在任务执行期间获得任何反馈——只有任务的最终结果。

对于任何对此感到好奇并根据 google 登陆此页面的人(比如我自己)。看起来好像现在可以通过 prompts feature! (I don't think it's even so much as a built-in module. It seems like it's just built-in. Can't find it under Ansible.Builtin Plugin Index. It's just under Playbook Advanced Features.