-1

I am a newbie to chef, need some inputs on writing a recipe for allowing the actions that needs user input like "Press 1 to continue", "2 to quit", "3 to redisplay" else an option to do the force continue.

In detail,below are the installation steps that I am trying to automate using chef cookbook.

  • I have a red hat decision manager service manually installed and configured on an AWS EC2 instance.

  • The setup has a JAR file and the following command runs the jar file, "java -jar rhdm-installer-7.7.0.jar -console"

  • The very first step is end user License agreement that prompts "Press 1 to continue", "2 to quit", "3 to redisplay"

  • The next step is a prompt expecting user input to enter the directory path of Jboss web server configuration

  • So far tried to run the cli without having "-console" but that doesn't help. "java -jar rhdm-installer-7.7.0.jar"

Would be great if anyone can help with some reference links or inputs on how to pass the inputs throughout the automated installation.

Thanks in advance.

user2083200
  • 9
  • 1
  • 4
  • You will find some other questions and answers on SO for accepting user input in Chef. In short, it is not possible. However for license agreement prompt you can run `chef-client --chef-license accept`. – seshadri_c Dec 04 '20 at 11:43
  • Thank you. I have a solution now. – user2083200 Dec 04 '20 at 13:47

1 Answers1

0

Having a bash command "yes 1 | java -jar rhdm-installer-7.7.0.jar -console" in the recipe did the work. Thanks

user2083200
  • 9
  • 1
  • 4