0

I am trying to use ansible.builtin.expect to automate an installer. At the beginning of the install, I have to "read" thru the license agreement by hitting the space bar 7 or 8 times. I do not know how to either specify text to expect, since it is a long license agreement, or how to automate a "space" character. Can someone please assist?

To sum up. I have something like:

- name: install program
  expect:
    command: '/<path>/install.sh
    responses:
       (What to put here?>

I think a "space bar" press will be needed 7 or 8 times till it gets to the point where it says "Do you accept the License Terms and Conditions stated above? (Accept/Decline) [D] : "

Thank you, MY

Mike
  • 41
  • 2
  • 8
  • 1
    Doesn't the installer have a command line flag for that? – Michael Hampton Jan 28 '21 at 20:46
  • I have not found anything to make that happen in the install.sh. I have found something to speed up things tho; when the license comes up, instead of hitting the space bar multiple times, I can hit 'q' and it takes me right to the end of the license. So that might be helpful. – Mike Jan 28 '21 at 22:51
  • Exactly what software is being installed? Maybe someone else knows of a better way to do it. – Michael Hampton Jan 28 '21 at 22:52
  • RSA 2FA software – Mike Jan 29 '21 at 18:06
  • I can't find anything like that. Are you sure that's what it's called? Where did you download it? – Michael Hampton Jan 29 '21 at 18:09
  • I'm sorry. I did not download it. My boss just said install this software on certain servers. Inside the installer, its called "RSA Authentication Agent".. – Mike Jan 29 '21 at 18:47
  • Its documentation tells you how to do an automated installation. You should start there. – Michael Hampton Jan 29 '21 at 18:54
  • You are correct. While reading the install.sh, I saw how to do "-s < config.file". And that might get me most of the way. At this point, my question is academic. I would still like to know how to enter a "space" or a "q" for expect, especially when I do now know exactly what the prompt will be. I just now I'm just trying to learn how to make a wheel, just for the learning. And thank you for all your help. It's good to be pushed roads you might not otherwise take :) – Mike Jan 29 '21 at 19:43

0 Answers0