summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Dittberner <jandd@cacert.org>2020-06-06 12:27:51 +0200
committerJan Dittberner <jandd@cacert.org>2020-06-06 12:27:51 +0200
commit40840e4163114017212da65e5597505e8a8bd52f (patch)
tree413345611c9b38cf4785ab7cf657d891e7220e4e
parent4009f3ee723da5914653dfbebe2cb3d21fe3f96f (diff)
downloadcacert-puppet-40840e4163114017212da65e5597505e8a8bd52f.tar.gz
cacert-puppet-40840e4163114017212da65e5597505e8a8bd52f.tar.xz
cacert-puppet-40840e4163114017212da65e5597505e8a8bd52f.zip
Fix puppet parser, epp and puppet-lint issues
-rw-r--r--sitemodules/profiles/manifests/nginx_revproxy.pp18
-rw-r--r--sitemodules/profiles/manifests/x509cert_common.pp5
-rw-r--r--sitemodules/profiles/templates/nginx_revproxy/virtual_host.nginx8
3 files changed, 13 insertions, 18 deletions
diff --git a/sitemodules/profiles/manifests/nginx_revproxy.pp b/sitemodules/profiles/manifests/nginx_revproxy.pp
index df43648..03dce7e 100644
--- a/sitemodules/profiles/manifests/nginx_revproxy.pp
+++ b/sitemodules/profiles/manifests/nginx_revproxy.pp
@@ -36,18 +36,15 @@ class profiles::nginx_revproxy (
owner => 'root',
group => 'root',
mode => '0755',
- } ->
- file { '/etc/nginx/nginx.conf':
+ } -> file { '/etc/nginx/nginx.conf':
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
source => 'puppet:///modules/profiles/nginx_revproxy/nginx.conf',
- } ->
- package { 'nginx-light':
+ } -> package { 'nginx-light':
ensure => present,
- } ->
- service { 'nginx':
+ } -> service { 'nginx':
ensure => running,
enable => true,
}
@@ -62,7 +59,7 @@ class profiles::nginx_revproxy (
ensure => file,
owner => 'root',
group => 'root',
- mode => 0644,
+ mode => '0644',
content => epp('profiles/nginx_revproxy/virtual_host.nginx',
{
'virtual_host' => $vhost,
@@ -75,11 +72,10 @@ class profiles::nginx_revproxy (
"/etc/ssl/private/${vhost}.key.pem",
],
notify => Service['nginx'],
- } ->
- file { "/etc/nginx/sites-enabled/${vhost}":
+ } -> file { "/etc/nginx/sites-enabled/${vhost}":
ensure => link,
- owner => 'root',
- group => 'root',
+ owner => 'root',
+ group => 'root',
target => "/etc/nginx/sites-available/${vhost}",
notify => Service['nginx'],
}
diff --git a/sitemodules/profiles/manifests/x509cert_common.pp b/sitemodules/profiles/manifests/x509cert_common.pp
index 8834bb3..dfa4b92 100644
--- a/sitemodules/profiles/manifests/x509cert_common.pp
+++ b/sitemodules/profiles/manifests/x509cert_common.pp
@@ -32,8 +32,7 @@
# ---------
#
# Copyright 2020 Jan Dittberner
-
-class profile::x509cert_common (
+class profiles::x509cert_common (
Hash[String, Data] $certificates,
) {
file { '/etc/ssl/public':
@@ -78,7 +77,7 @@ class profile::x509cert_common (
content => $cert_info['certificate'],
}
$cert_info['cacerts'].each |$index, $ca_cert| {
- $order = 11 + $index,
+ $order = 11 + $index
concat::fragment { "${name}-${ca_cert}":
order => $order,
target => $certificate_chain,
diff --git a/sitemodules/profiles/templates/nginx_revproxy/virtual_host.nginx b/sitemodules/profiles/templates/nginx_revproxy/virtual_host.nginx
index 3798706..2173adf 100644
--- a/sitemodules/profiles/templates/nginx_revproxy/virtual_host.nginx
+++ b/sitemodules/profiles/templates/nginx_revproxy/virtual_host.nginx
@@ -1,7 +1,7 @@
-# <%- | String $virtual_host,
-# String $target,
-# String $custom_config,
-#| -%>
+<%- | String $virtual_host,
+ String $target,
+ String $custom_config,
+| -%>
# THIS FILE IS MANAGED BY PUPPET, MANUAL CHANGES WILL BE OVERWRITTEN AT THE
# NEXT PUPPET RUN.