Модуль Ansible Expect повторяет ответ - PullRequest
0 голосов
/ 26 сентября 2019

Я использую модуль Ansible Expect для установки программного обеспечения.Установка программного обеспечения задает несколько вопросов во время установки.Кажется, все идет хорошо до последних нескольких вопросов.Когда вопрос задан, используются ответы из предыдущих вопросов.Смотрите код и многословие ниже.Заранее благодарим за любую помощь.

name: Run the Install of the software
expect:
chdir: /tmp/
timeout: 120
command: ./software.bin -c
responses: 
  Do you want to continue? : 'y'
  Select only the set of components you want to install : '2'
  Communication Direction : '1'
  Where should the software be installed? : ""
  Minimum requirements met. Select "Yes" to continue, "No" to cancel installation : 'y'
  First name : 'Doug'
  Last name : 'Keller'
  Company : 'Awesome'
  Do you want to pair the scan engine with the console now? : 'y'
  Console Address : '10.x.x.x'
  Console TCP Port : ""
  Shared Secret : 'some-secret'
  Please select t to test your connection before continuing to pair with the console : 't'
  Select c to pair this engine to the console: 'c'
  sudo systemctl start software.service: ""
echo: yes

Детальность ниже:

"                                                                           ", 
    "Do you want to pair the scan engine with the console now? Pairing on installation is recommended, but you can pair later if necessary. ", 
    "Yes [y], No [n]", 
    "y", 
    "Specify the details for the Security Console with which to pair this Scan Engine", 
    "Console Address:", 
    "[]", 
    "10.x.x.x", 
    "Console TCP Port:", 
    "[40000]", 
    "", 
    "", 
    "Shared Secret:", 
    "[]", 
    "some-secret", 
    "The port number is valid.", 
    "Console Address accepted.", 
    "Console Shared Secret accepted.", 
    "Testing the connection is required. Please select t to test your connection before continuing to pair with the console.", 
    "Test [t, Enter], Continue [c]", 
    "10.x.x.x", 
    "Testing the connection is required. Please select t to test your connection before continuing to pair with the console.", 
    "Test [t, Enter], Continue [c]", 
    "some-secret", 
    "Testing the connection is required. Please select t to test your connection before continuing to pair with the console.", 
    "Test [t, Enter], Continue [c]", 
    "t", 
    "running test...", 
    "Communication between engine and console succeeded!", 
    "Select c to pair this engine to the console.", 
    "Test [t, Enter], Continue [c]", 
    "t", 
    "running test...", 
    "Communication between engine and console succeeded!", 
    "Select c to pair this engine to the console.", 
    "Test [t, Enter], Continue [c]", 
    "t", 
    "running test...", 
    "Communication between engine and console succeeded!", 
    "Select c to pair this engine to the console.", 
    "Test [t, Enter], Continue [c]"
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...