Ask Your Question
0

puppet exec command how to set up one Interactive command

asked 2016-08-19 03:31:45 -0500

tthaizhiguang gravatar image

updated 2016-08-22 04:47:05 -0500

rajeevsharma gravatar image

Hi ,

I have one requirement need to set up one openssl ocsp service, the command as below:

exec {'config OCSP on 8888':
    timeout => '3',
  logoutput => 'true',
    cwd     => '/home/oracle/puppet/openssl/openssl-1.0.2g/',
    path    => ["/bin","usr/bin","/home/oracle/puppet/openssl/openssl-1.0.2g/","/usr/bin/perl"],
    command => '/home/oracle/openssl/buildones/bin/openssl ocsp -index test/CA/index.txt -port 8888 -rkey test/CA/private/cakey.pem -rsigner test/CA/certs/cacert.pem -CA test/CA/certs/cacert.pem -text -out test/CA/log1.txt -ignore_err';
}

when you execute the command in terminal

#/home/oracle/openssl/buildones/bin/openssl ocsp -index test/CA/index.txt -port 8888 -rkey test/CA/private/cakey.pem -rsigner test/CA/certs/cacert.pem -CA test/CA/certs/cacert.pem -text -out test/CA/log1.txt -ignore_err

it will wait the user to input the passowrd of cakey.pem , as below: Enter pass phrase for /home/oracle/puppet/test/CA/CertPath/private/cakey.pem:

it seem the puppet "exec" resource not support the Interactive operation, Are there some other ways that I can fix this issue?Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-08-22 04:54:53 -0500

rajeevsharma gravatar image

Hi, Once I had the same requirement and I didn't find anything in puppet which gives manual intervention while puppet agent is running/executing the code and converging the system. Better you can prepare expectscript which can be called from exec resource.

Hope it helps.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-08-19 03:20:22 -0500

Seen: 93 times

Last updated: Aug 22 '16