首页 > 解决方案 > 如何使用 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'

标签: ansibledevops

解决方案


推荐阅读