用于安装 ASP 的 Puppet 模块(不是 ASP.Net)



我们有一个旧网站,它使用经典的ASP来实现其部分功能。 我们正在将其移至Windows 2012,并希望尝试将该过程傀儡化。 是否有木偶模块可以安装经典的ASP,我们可以从锻造厂或其他地方使用?

这是一个很好的问题。我猜你已经搜索了锻造厂和GitHub:

  • https://forge.puppetlabs.com/modules?utf-8=%E2%9C%93&sort=rank&q=asp
  • https://github.com/search?q=puppet+asp&ref=reposearch&utf8=%E2%9C%93

我也环顾四周,没有看到一个。我认为您坚持将其添加到您自己的清单/模块中。但是,安装 ASP 的过程实际上就像在 IIS 中启用它一样简单。

迪斯姆

你可以通过简单地使用puppetlabs-dism模块来获得它

# may require other items turned on as well with DISM
dism { "IIS-ASP":
  ensure => present,
}

注意:您可能需要安装其他组件,因此可能需要进行更多检查。

窗口功能(推荐)

对于更新的方法,应该安装Windows模块包,尽管您可以只安装puppet-windows功能模块。

  # add windows features
  # Ensure IIS itself is installed with management tools
  windowsfeature { 'Web-WebServer':
  installmanagementtools => true,
  } ->
  # Ensure ASP is enabled for IIS
  windowsfeature { 'Web-Asp':
  } ->
  # Optionally ensure ASP.NET 3.5 is enabled for IIS
  windowsfeature { 'Web-Asp-Net':
  } ->
  # Optionally ensure ASP.NET 4.5 is enabled for IIS
  windowsfeature { 'Web-Asp-Net45':
  }

以上有点超出,但它显示了您可能甚至没有考虑过的事情,Puppet可以为您处理安装和配置IIS本身。使用 Windows 功能模块的示例是从巧克力chocolatey_server模块中提取的 - 请参阅 https://github.com/chocolatey/puppet-chocolatey_server/blob/55b58e7869f0665c63e285749de13837f6748767/manifests/init.pp#L45-L69,您将看到还可以使用 puppet-iis 模块管理 IIS 站点和应用程序池。

相关内容

最新更新