Created
September 11, 2013 18:43
-
-
Save drusellers/6527963 to your computer and use it in GitHub Desktop.
create website in iis
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
class blue::websites { | |
# this creates the root website | |
iis_site { 'dovetail': | |
ensure => 'present', | |
bindings => 'http/*:80', | |
} | |
iis_app {'dovetail/': | |
ensure => 'present', | |
applicationpool => 'DefaultAppPool', | |
} | |
iis_vdir{'dovetail/': | |
ensure => 'present', | |
iis_app => 'dovetail/', | |
physicalpath => 'C:\dovetail\wwwroot', | |
} | |
file { 'C:\dovetail\wwwroot': | |
ensure => "directory" | |
} | |
# ends root website | |
#basic setup | |
file { 'C:\dovetail': | |
ensure => "directory" | |
} | |
file { 'C:\dovetail\apps': | |
ensure => "directory", | |
require => File['C:\dovetail'] | |
} | |
#end basic | |
class dtwebapp($bob) { | |
iis_apppool {"Dovetail_$bob": | |
ensure => 'present', | |
managedpipelinemode => 'Integrated', | |
managedruntimeversion => 'v4.0', | |
} | |
iis_app {"dovetail/$bob": | |
ensure => 'present', | |
applicationpool => "Dovetail_$bob", | |
require => Iis_apppool["Dovetail_$bob"] | |
} | |
iis_vdir{"dovetail/$bob/": | |
ensure => 'present', | |
iis_app => "dovetail/$bob", | |
physicalpath => "C:\\dovetail\\apps\\$bob", | |
require => Iis_site['dovetail'] | |
} | |
file { "C:\\dovetail\\apps\\$bob": | |
ensure => "directory", | |
require => File['C:\dovetail\apps'] | |
} | |
} | |
class { 'dtwebapp': | |
bob => 'agent' | |
} | |
} | |
class blue::websites::remove { | |
} |
node default {
#include truth::enforcer
#include blue::iis
#include blue::smtp
blue::dtwebapp {'agent':
bob => 'agent'
}
blue::dtwebapp {'selfservice':
bob => 'selfservice'
}
}
define blue::dtwebapp($bob) {
iis_apppool {"Dovetail_$bob":
ensure => 'present',
managedpipelinemode => 'Integrated',
managedruntimeversion => 'v4.0',
}
iis_app {"dovetail/$bob":
ensure => 'present',
applicationpool => "Dovetail_$bob",
require => Iis_apppool["Dovetail_$bob"],
}
iis_vdir{"dovetail/$bob/":
ensure => 'present',
iis_app => "dovetail/$bob",
physicalpath => "C:\\dovetail\\apps\\$bob",
require => Iis_site['dovetail'],
}
file { "C:\\dovetail\\apps\\$bob":
ensure => "directory",
require => File['C:\dovetail\apps'],
}
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is where it errors