This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
log "###=> Installing IIS on #{node['platform']}" do | |
level :info | |
end | |
%w( Web-Server Web-Mgmt-Tools ).each do |feature| | |
windows_feature feature do | |
action :install | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this_time = Time.new | |
ruby_block 'Update sshd_config' do | |
block do | |
begin | |
file = Chef::Util::FileEdit.new('/etc/ssh/sshd_config') | |
rescue StandardError => e | |
puts "==>### ERROR: #{e.message}" | |
end | |
file.search_file_replace_line(/#?GSSAPIAuthentication yes/, "GSSAPIAuthentication no #Updated by Chef #{this_time.inspect}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
puts "###=>INFO: Installing Apache2 on #{node['platform']}" | |
package 'Install Apache' do | |
case node['platform'] | |
when 'redhat', 'centos' # ~FC024 | |
package_name 'httpd' | |
when 'ubuntu', 'debian' | |
package_name 'apache2' | |
else | |
fail "no #{node['platform']} Apache2 package_name defined." if (true) | |
end |