我有一些需要用戶交互的命令,以便我可以在Enter
的默認設置下輸入時間,或者從廚師本身提供一些輸入,這樣我的實例在運行時就不會失敗。例如...如何在Chef中的命令上進行用戶交互?
./build-ca # The command I am executing
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [IN]:
State or Province Name (full name) [KA]:
這裏按enter
會做這項工作(使用默認值),而手動doint,但我怎麼能使用自動廚師這個東西,有時候我需要按y
或其它值。任何幫助將不勝感激。
您的命令是否可以接受參數? – Carlo
使用[template](https://docs.chef.io/resource_template.html)渲染你的'openssl.cnf',然後用'-config openssl.cnf'調用'openssl'可執行文件。 – StephenKing
https://supermarket.chef.io/cookbooks/ssl_certificate –