Comments (5)
@hyuan-esol im not quite sure what the issue you are reporting is?
from puppet-iis.
The Application Pool and Physical Path is not updated for existing Virtual Application. I had done that locally. Do you need to see my changes?
from puppet-iis.
hi @hyuan-esol - id certainly love to see the changes
from puppet-iis.
Here you go:
define iis::manage_virtual_application($site_name, $site_path, $app_pool, $virtual_application_name = $title, $ensure = 'present') {
include 'iis::param::powershell'
validate_re($ensure, '^(present|installed|absent|purged)$', 'ensure must be one of \'present\', \'installed\', \'absent\', \'purged\'')
if ($ensure in ['present','installed']) {
iis::createpath { "${site_name}-${virtual_application_name}-${site_path}":
site_path => $site_path
}
$cmdAppExists = "Test-Path \\\"IIS:\\Sites\\${site_name}\\${virtual_application_name}\\\""
exec { "CreateVirtualApplication-${site_name}-${virtual_application_name}" :
command => "${iis::param::powershell::command} -Command \"Import-Module WebAdministration; New-WebApplication -Name ${virtual_application_name} -Site ${site_name} -PhysicalPath ${site_path} -ApplicationPool ${app_pool}\"",
path => "${iis::param::powershell::path};${::path}",
onlyif => "${iis::param::powershell::command} -Command \"Import-Module WebAdministration; if((${$cmdAppExists})) { exit 1 } else { exit 0 }\"",
require => [ Iis::Createpath["${site_name}-${virtual_application_name}-${site_path}"], Iis::Manage_site[$site_name] ],
logoutput => true,
}
exec { "UpdateVirtualApplication-${site_name}-${virtual_application_name}-PhysicalPath" :
command => "${iis::param::powershell::command} -Command \"Import-Module WebAdministration; Set-ItemProperty \\\"IIS:\\Sites\\${site_name}\\${virtual_application_name}\\\" -Name PhysicalPath -Value \\\"${site_path}\\\"\"",
path => "${iis::param::powershell::path};${::path}",
onlyif => "${iis::param::powershell::command} -Command \"Import-Module WebAdministration; if((${$cmdAppExists})) { exit 0 } else { exit 1 }\"",
logoutput => true,
}
exec { "UpdateVirtualApplication-${site_name}-${virtual_application_name}-ApplicationPool" :
command => "${iis::param::powershell::command} -Command \"Import-Module WebAdministration; Set-ItemProperty \\\"IIS:\\Sites\\${site_name}\\${virtual_application_name}\\\" -Name ApplicationPool -Value \\\"${app_pool}\\\"\"",
path => "${iis::param::powershell::path};${::path}",
onlyif => "${iis::param::powershell::command} -Command \"Import-Module WebAdministration; if((${$cmdAppExists})) { exit 0 } else { exit 1 }\"",
logoutput => true,
}
} else {
exec { "DeleteVirtualApplication-${site_name}-${virtual_application_name}" :
command => "${iis::param::powershell::command} -Command \"Import-Module WebAdministration; Remove-WebApplication -Name ${virtual_application_name} -Site ${site_name}\"",
path => "${iis::param::powershell::path};${::path}",
onlyif => "${iis::param::powershell::command} -Command \"Import-Module WebAdministration; if(!(${$cmdAppExists})) { exit 1 } else { exit 0 }\"",
logoutput => true,
}
}
}
from puppet-iis.
Hi. I'm going to close this Issue. We deprecated the module and the new version is available here: https://forge.puppet.com/puppetlabs/iis
from puppet-iis.
Related Issues (20)
- Error in IIS Site SpecificUser HOT 1
- manage_binding not working on Windows Server 2008 R2 HOT 5
- enable_32_bit is not enabled when specified to be true HOT 4
- Constant Execution of exec HOT 27
- Is there support on Powershell v2.0 HOT 1
- Managing Core IIS Functionality HOT 1
- Dependency on Powershell HOT 6
- iis::manage_app_pool support 'no managed runtime' HOT 8
- IIS and PowerShell versions not compatible. HOT 2
- When attempting to remove non-SSL binding, PS command fails HOT 1
- Are there plans to make this Puppet 4.x compatible? HOT 1
- manage_virtual_application does not update physical path in IIS HOT 1
- Cannot find type [Microsoft.Web.Administration.ServerManager] HOT 3
- Unable to map site path to UNC HOT 1
- JSON text must at least contain two octets! undefined method downcase for nil:NilClass
- Manage log path HOT 1
- Unable to create virtual directories of the same name in different IIS sites with iis_virtualdirectory HOT 1
- Looking for inforamtion on version 4.0.0, HOT 1
- SSL certficate not getting renew on my IIS-8 HOT 1
- puppet-iis module does not document how to configure an IIS App Pool to run as "No managed code" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-iis.