使用Puppet使用angular色 – configuration文件模式时设置SSL密钥

这是一个场景。 我有两个Web应用程序(让我们称之为webapp1和webapp2)需要apache,php(有一些模块)和web应用程序自己的代码。 这是我设置这个(我使用angular色configuration文件模式):

modules/ apache/ php/ webapp1/ # responsible for cloning the repo and setting up config files webapp2/ # responsible for cloning the repo and setting up config files profiles/ manifests/ webapp1.pp # responsible for putting the stack together webapp2.pp # responsible for putting the stack together 

profiles / manifests / webapp1.pp看起来像这样:

 class profiles::webapp1 { include ::apache include ::php include ::webapp1 } 

和configuration文件/清单/ webapp1.pp看起来像这样:

 class profiles::webapp2 { include ::apache include ::php include ::webapp2 } 

现在,这两个应用程序也必须通过HTTPS提供服务,并且需要相同的一组SSL证书(想象一下,webapp1和webapp2是从一个域的不同子域提供的,并且我们有一个通配符证书,因此这两个应用程序都可以使用相同的证书)。 现在,我不能决定清单来做SSL设置(即使用filetypes设置密钥和证书),原因是至less现在我将把webapp1和webapp2都放在同一个angular色清单中,但是想要变得灵活一点,以便我可以将webapp1和webapp2移动到不同的angular色中,而不用担心以不同的方式进行SSL设置。

我会把它们放在一个单独的类中,例如“wildcard_ssl_”,并且可能包含来自“webappX”类中的类,或者可能来自两个configuration文件。