0
在我的環境中,我有超過100個系統。我想使用紅寶石或外殼腳本在廚師中引導多個節點如何使用紅寶石或shell腳本在廚師中引導多個節點
File.readlines('hosts').each do |line|
<pre><strong>
knife bootstrap line -x ec2-user -i ~/Downloads/ram123456.pem -N node-#{line} -r 'recipe[day2]' --sudo
end</strong></pre>
是否有任何代碼或文檔可以做到這一點 –
不,你必須自己編寫for循環。 – coderanger
shell腳本,如果可能的話給出如何傳遞主機名和節點名稱的大綱 –