1
0
mirror of https://github.com/krislamo/puppet-acme_vault synced 2024-11-09 20:30:36 +00:00

puppet-lint

This commit is contained in:
Bob Belnap 2018-02-26 14:54:07 -05:00
parent 8a5abc08c6
commit 8a09e270ce
4 changed files with 37 additions and 37 deletions

View File

@ -30,7 +30,7 @@ END
ensure => directory, ensure => directory,
owner => $user, owner => $user,
group => $group, group => $group,
mode => "0750", mode => '0750',
} }
# vault module isn't too flexible for install only, just copy in binary # vault module isn't too flexible for install only, just copy in binary
@ -41,28 +41,28 @@ END
file { $vault_bin: file { $vault_bin:
ensure => present, ensure => present,
owner => "root", owner => 'root',
group => "root", group => 'root',
mode => "0555", mode => '0555',
source => "puppet:///modules/acme_vault/vault", source => 'puppet:///modules/acme_vault/vault',
} }
# variables in bashrc # variables in bashrc
concat { "${home_dir}/.bashrc": concat { "${home_dir}/.bashrc":
owner => $user, owner => $user,
group => $group, group => $group,
mode => "0600", mode => '0600',
} }
concat::fragment{ "vault_bashrc": concat::fragment{ 'vault_bashrc':
target => "${home_dir}/.bashrc", target => "${home_dir}/.bashrc",
content => inline_template($common_bashrc_template), content => inline_template($common_bashrc_template),
order => "01", order => '01',
} }
# common dummy cron job to set MAILTO # common dummy cron job to set MAILTO
cron { "dummy_mailto": cron { 'dummy_mailto':
command => "/bin/true", command => '/bin/true',
user => $user, user => $user,
month => 7, month => 7,
environment => "MAILTO=${contact_email}", environment => "MAILTO=${contact_email}",

View File

@ -16,14 +16,14 @@ class acme_vault::deploy(
ensure => present, ensure => present,
owner => $user, owner => $user,
group => $group, group => $group,
mode => "0750", mode => '0750',
source => "puppet:///modules/acme_vault/check_cert.sh", source => 'puppet:///modules/acme_vault/check_cert.sh',
} }
if $restart { if $restart {
$cron_command = "${home_dir}/check_cert.sh $domain $cert_destination_path && $restart_command" $cron_command = "${home_dir}/check_cert.sh ${domain} ${cert_destination_path} && ${restart_command}"
} else { } else {
$cron_command = "${home_dir}/check_cert.sh $domain $cert_destination_path" $cron_command = "${home_dir}/check_cert.sh ${domain} ${cert_destination_path}"
} }

View File

@ -12,15 +12,15 @@ class acme_vault::params {
$contact_email = '' $contact_email = ''
$acme_revision = 'HEAD' $acme_revision = 'HEAD'
$acme_repo_path = "$home_dir/acme.sh" $acme_repo_path = "${home_dir}/acme.sh"
$acme_script = "$acme_repo_path/acme.sh" $acme_script = "${acme_repo_path}/acme.sh"
$vault_prefix = '/secret/letsencrypt/' $vault_prefix = '/secret/letsencrypt/'
$domains = '' $domains = ''
# authentication # authentication
$vault_token = '' $vault_token = ''
$vault_addr = '' $vault_addr = ''
$vault_bin = "$home_dir/vault" $vault_bin = "${home_dir}/vault"
# lexicon # lexicon
$lexicon_provider = '' $lexicon_provider = ''
@ -32,6 +32,6 @@ class acme_vault::params {
$cert_destination_path = '/etc/acme/' $cert_destination_path = '/etc/acme/'
$restart = false $restart = false
$restart_command = "echo restart!" $restart_command = 'echo restart!'
} }

View File

@ -37,10 +37,10 @@ END
}) })
# variables in bashrc # variables in bashrc
concat::fragment { "requestor_bashrc": concat::fragment { 'requestor_bashrc':
target => "${home_dir}/.bashrc", target => "${home_dir}/.bashrc",
content => inline_template($requestor_bashrc_template), content => inline_template($requestor_bashrc_template),
order => "02", order => '02',
} }
@ -48,7 +48,7 @@ END
vcsrepo { $acme_repo_path: vcsrepo { $acme_repo_path:
ensure => present, ensure => present,
provider => git, provider => git,
source => "https://github.com/Neilpang/acme.sh.git", source => 'https://github.com/Neilpang/acme.sh.git',
revision => $acme_revision, revision => $acme_revision,
} }
@ -56,12 +56,12 @@ END
$domains.each |$domain, $d_list| { $domains.each |$domain, $d_list| {
file {"/${home_dir}/${domain}.sh": file {"/${home_dir}/${domain}.sh":
ensure => present, ensure => present,
mode => "0700", mode => '0700',
owner => $user, owner => $user,
group => $group, group => $group,
content => epp("acme_vault/domain.epp", { content => epp('acme_vault/domain.epp', {
acme_script => "$acme_script", acme_script => $acme_script,
domain => $domain, domain => $domain,
domains => $d_list, domains => $d_list,
staging => $staging, staging => $staging,