diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2016-06-17 15:31:45 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2016-06-17 15:31:45 -0300 |
commit | 79658fbaa4f35fe4cdc44e0772a503abeb188dfb (patch) | |
tree | 3eb58eacf6c62bb7a11a254b6cac3a6f855d96c6 /manifests | |
parent | 683dbde79850db946078624cf8a07ec2c954701b (diff) | |
download | puppet-nginx-79658fbaa4f35fe4cdc44e0772a503abeb188dfb.tar.gz puppet-nginx-79658fbaa4f35fe4cdc44e0772a503abeb188dfb.tar.bz2 |
Adds site templates
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/init.pp | 9 | ||||
-rw-r--r-- | manifests/site/config.pp | 8 |
2 files changed, 10 insertions, 7 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index a17f847..d1966d8 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -21,10 +21,11 @@ class nginx inherits nginx::base { # Default site nginx::site { "default": - ensure => present, - ssl => absent, - source => 'template', - certbot => false, + ensure => present, + ssl => absent, + source => 'template', + template => 'default', + certbot => false, } # Domain site diff --git a/manifests/site/config.pp b/manifests/site/config.pp index 991a70b..8e1f71b 100644 --- a/manifests/site/config.pp +++ b/manifests/site/config.pp @@ -1,6 +1,8 @@ define nginx::site::config( - $ensure = present, - $source = 'file', + $ensure = present, + $source = 'file', + $template = 'site', + $backend = 'weblocal', ){ case $source { 'file': { @@ -16,7 +18,7 @@ define nginx::site::config( } 'template': { file { "/etc/nginx/sites-available/$name": - content => template("nginx/$name.erb"), + content => template("nginx/${template}.erb"), owner => "root", group => "root", mode => 0644, |