Skip to content

Commit

Permalink
add if condition
Browse files Browse the repository at this point in the history
  • Loading branch information
tw3rp committed Feb 20, 2019
1 parent 03f9b2d commit 625cdf7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion integration/confdir/templates/certkey.pem.tmpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{{if exists "/pki/issue/my-role/www.example.com/certificate"}}
{{- $certificate := getv "/pki/issue/my-role/www.example.com/certificate" -}}
{{- $private_key := getv "/pki/issue/my-role/www.example.com/private_key" -}}
{
"certificate": "{{ replace $certificate "\n" "\\n" -1 }}",
"key": "{{ replace $private_key "\n" "\\n" -1 }}"
}
}
{{end}}

0 comments on commit 625cdf7

Please sign in to comment.