ansible - 如何使用 ansible expect 滚动浏览 EULA?
问题描述
我有一本看起来像这样的剧本。有几页 EULA 需要滚动。我该如何做到这一点?
name: Deploy Enterprise Litespeed Web Host
hosts: lstest
become: yes
vars:
- install_directory: /usr/local/lsws
tasks:
- name: Execute enterprise lsws installation script
ansible.builtin.expect:
echo: yes
chdir: '{{ install_dir }}'
command: bash ./admin/misc/install.sh
responses:
(.*)End-User License Agreement(.*):
- 'q'
Do you agree with above license?(.*):
- 'Yes'
Destination(.*):
- 'Y'
解决方案
推荐阅读
- python - 我可以使用 df1 中的一列和 df2 单元格中的任何值之一连接两个数据框吗?
- javascript - Uncaught (in promise) dom-to-image
- c++ - Visual Studio中编译wiringPi.h的错误
- python - 通过组合文本熊猫制作新的数据框
- mysql - 如果一列被更改,如何更新另一列?
- tensorflow - 在 TensorFlow 中提取地标周围的多个补丁
- django - 自定义模板未在 Django 中正确加载
- python - Chrome 没有从 pycharm/selenium 启动,并给出消息 Process finished with exit code 0
- java - JavaFX 从 TableView 中删除
- android - 由于 minSDKversion &targetSDKversion 可能导致应用程序在发布时崩溃