This commit is contained in:
parent
1d03cceaf4
commit
b0b7146e2d
|
@ -12,12 +12,16 @@ $VAULT_ADDR/v1/rootca_store/issue/{{vaultStoreRole}} > certificateResult.txt
|
|||
|
||||
jq .data.private_key certificateResult.txt | sed "s/\"//g" | sed "s/\\\n/\n/g" > cert.pem
|
||||
jq .data.certificate certificateResult.txt | sed "s/\"//g" | sed "s/\\\n/\n/g" > cert.crt
|
||||
jq .data.ca_chain[0] certificateResult.txt | sed "s/\"//g" | sed "s/\\\n/\n/g" > ca.crt
|
||||
jq .data.ca_chain[1] certificateResult.txt | sed "s/\"//g" | sed "s/\\\n/\n/g" >> ca.crt
|
||||
|
||||
jq .data.ca_chain certificateResult.txt | sed "s/\"//g" | sed "s/\\\n/\n/g" > ca.crt.tmp
|
||||
jq .data.issuing_ca certificateResult.txt | sed "s/\"//g" | sed "s/\\\n/\n/g" >> ca.crt.tmp
|
||||
jq .data.ca_chain[0] certificateResult.txt | sed "s/\"//g" | sed "s/\\\n/\n/g" >> ca.crt.tmp
|
||||
jq .data.ca_chain[1] certificateResult.txt | sed "s/\"//g" | sed "s/\\\n/\n/g" >> ca.crt.tmp
|
||||
grep ca.crt.tmp -v -e null > ca.crt
|
||||
|
||||
mv cert.pem /etc/ssl/private/$(hostname).{{local_domainname}}.key
|
||||
mv cert.crt /etc/ssl/certs/$(hostname).{{local_domainname}}.crt
|
||||
mv ca.crt /etc/ssl/certs/{{local_domainname}}-CA-chain.crt
|
||||
|
||||
|
||||
rm certificateResult.txt
|
||||
#rm certificateResult.txt
|
||||
|
|
Loading…
Reference in New Issue