diff --git a/manifests/common.pp b/manifests/common.pp index aca5a0b..437bbf0 100644 --- a/manifests/common.pp +++ b/manifests/common.pp @@ -30,7 +30,7 @@ END ensure => directory, owner => $user, group => $group, - mode => "0750", + mode => '0750', } # vault module isn't too flexible for install only, just copy in binary @@ -38,31 +38,31 @@ END #class { '::vault::install': # manage_user => false, #} - + file { $vault_bin: ensure => present, - owner => "root", - group => "root", - mode => "0555", - source => "puppet:///modules/acme_vault/vault", + owner => 'root', + group => 'root', + mode => '0555', + source => 'puppet:///modules/acme_vault/vault', } # variables in bashrc concat { "${home_dir}/.bashrc": - owner => $user, - group => $group, - mode => "0600", + owner => $user, + group => $group, + mode => '0600', } - concat::fragment{ "vault_bashrc": + concat::fragment{ 'vault_bashrc': target => "${home_dir}/.bashrc", content => inline_template($common_bashrc_template), - order => "01", + order => '01', } # common dummy cron job to set MAILTO - cron { "dummy_mailto": - command => "/bin/true", + cron { 'dummy_mailto': + command => '/bin/true', user => $user, month => 7, environment => "MAILTO=${contact_email}", diff --git a/manifests/deploy.pp b/manifests/deploy.pp index 2b7780d..fed3544 100644 --- a/manifests/deploy.pp +++ b/manifests/deploy.pp @@ -16,23 +16,23 @@ class acme_vault::deploy( ensure => present, owner => $user, group => $group, - mode => "0750", - source => "puppet:///modules/acme_vault/check_cert.sh", + mode => '0750', + source => 'puppet:///modules/acme_vault/check_cert.sh', } 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 { - $cron_command = "${home_dir}/check_cert.sh $domain $cert_destination_path" + $cron_command = "${home_dir}/check_cert.sh ${domain} ${cert_destination_path}" } notice($user) $domains.each |$domain| { cron { "${domain}_deploy": - command => $cron_command, - user => $user, - weekday => 2, + command => $cron_command, + user => $user, + weekday => 2, } } diff --git a/manifests/params.pp b/manifests/params.pp index fe1c0f0..9ad96ed 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -12,15 +12,15 @@ class acme_vault::params { $contact_email = '' $acme_revision = 'HEAD' - $acme_repo_path = "$home_dir/acme.sh" - $acme_script = "$acme_repo_path/acme.sh" + $acme_repo_path = "${home_dir}/acme.sh" + $acme_script = "${acme_repo_path}/acme.sh" $vault_prefix = '/secret/letsencrypt/' $domains = '' # authentication $vault_token = '' $vault_addr = '' - $vault_bin = "$home_dir/vault" + $vault_bin = "${home_dir}/vault" # lexicon $lexicon_provider = '' @@ -32,6 +32,6 @@ class acme_vault::params { $cert_destination_path = '/etc/acme/' $restart = false - $restart_command = "echo restart!" + $restart_command = 'echo restart!' } diff --git a/manifests/requestor.pp b/manifests/requestor.pp index cb4acac..86a0969 100644 --- a/manifests/requestor.pp +++ b/manifests/requestor.pp @@ -37,10 +37,10 @@ END }) # variables in bashrc - concat::fragment { "requestor_bashrc": + concat::fragment { 'requestor_bashrc': target => "${home_dir}/.bashrc", content => inline_template($requestor_bashrc_template), - order => "02", + order => '02', } @@ -48,32 +48,32 @@ END vcsrepo { $acme_repo_path: ensure => present, provider => git, - source => "https://github.com/Neilpang/acme.sh.git", + source => 'https://github.com/Neilpang/acme.sh.git', revision => $acme_revision, } # create issue scripts $domains.each |$domain, $d_list| { file {"/${home_dir}/${domain}.sh": - ensure => present, - mode => "0700", - owner => $user, - group => $group, + ensure => present, + mode => '0700', + owner => $user, + group => $group, - content => epp("acme_vault/domain.epp", { - acme_script => "$acme_script", + content => epp('acme_vault/domain.epp', { + acme_script => $acme_script, domain => $domain, domains => $d_list, staging => $staging, staging_url => $staging_url, prod_url => $prod_url, - } + } ) } cron { "${domain}_issue": - command => "${home_dir}/${domain}.sh", - user => $user, - weekday => 1, + command => "${home_dir}/${domain}.sh", + user => $user, + weekday => 1, } }