mirror of
https://github.com/inspec/inspec
synced 2024-11-27 15:10:44 +00:00
a69cd1efee
Signed-off-by: Justin Schuhmann <jmschu02@gmail.com>
25 lines
577 B
Ruby
25 lines
577 B
Ruby
# set up test site for iis resource
|
|
|
|
return unless node['platform_family'] == 'windows'
|
|
|
|
# make sure the iis windows feature is installed
|
|
dsc_script 'Web-Server' do
|
|
code <<-EOH
|
|
WindowsFeature InstallWebServer
|
|
{
|
|
Name = "Web-Server"
|
|
Ensure = "Present"
|
|
}
|
|
EOH
|
|
end
|
|
|
|
directory "C:\\www\\inetpub\\Test" do
|
|
recursive true
|
|
end
|
|
|
|
powershell_script 'Create-WebApplication' do
|
|
code <<-EOH
|
|
Import-Module WebAdministration
|
|
New-WebApplication -Name "TestApp" -Site 'Default Web Site' -PhysicalPath "C:\\www\\inetpub\\Test" -ApplicationPool "DefaultAppPool"
|
|
EOH
|
|
end
|