We got our second node connected to the chef server. We made a cookbook to install Webmin which is a web based interface to do system administration on Linux.
Here is our Webmin recipe:
# # Cookbook Name:: webmin # Recipe:: default # apt_package 'perl' apt_package 'libnet-ssleay-perl' apt_package 'openssl' apt_package 'libauthen-pam-perl' apt_package 'libpam-runtime' apt_package 'libio-pty-perl' apt_package 'apt-show-versions' apt_package 'python' bash 'download_webmin' do user 'root' cwd '/tmp' code <<-EOH wget http://prdownloads.sourceforge.net/webadmin/webmin_1.820_all.deb EOH end bash 'download_webmin' do user 'root' cwd '/tmp' code <<-EOH dpkg --install webmin_1.820_all.deb EOH end
It’s simple but it gets the job done. We tried using the dpkg resource that Chef has, but it didn’t work, so I had to use the bash resource instead. On the next post I’ll talk about our other node and the recipe we wrote for that.