49 lines
1.1 KiB
JSON
49 lines
1.1 KiB
JSON
[
|
|
{
|
|
"name": "directories",
|
|
"become": true,
|
|
"loop": [
|
|
"/etc/ssl/private",
|
|
"/etc/ssl/csr",
|
|
"/etc/ssl/certs",
|
|
"/etc/ssl/fullchains"
|
|
],
|
|
"ansible.builtin.file": {
|
|
"state": "directory",
|
|
"path": "{{item}}"
|
|
}
|
|
},
|
|
{
|
|
"name": "key",
|
|
"become": true,
|
|
"ansible.builtin.copy": {
|
|
"src": "{{var_tlscert_existing_key_path}}",
|
|
"dest": "/etc/ssl/private/{{var_tlscert_existing_domain}}.pem"
|
|
}
|
|
},
|
|
{
|
|
"name": "cert",
|
|
"become": true,
|
|
"ansible.builtin.copy": {
|
|
"src": "{{var_tlscert_existing_cert_path}}",
|
|
"dest": "/etc/ssl/certs/{{var_tlscert_existing_domain}}.pem"
|
|
}
|
|
},
|
|
{
|
|
"name": "fullchain | insert",
|
|
"when": "var_tlscert_existing_fullchain_path != None",
|
|
"become": true,
|
|
"ansible.builtin.copy": {
|
|
"src": "{{var_tlscert_existing_fullchain_path}}",
|
|
"dest": "/etc/ssl/fullchains/{{var_tlscert_existing_domain}}.pem"
|
|
}
|
|
},
|
|
{
|
|
"name": "fullchain | compose",
|
|
"when": "var_tlscert_existing_fullchain_path == None",
|
|
"become": true,
|
|
"ansible.builtin.shell": {
|
|
"cmd": "cat /etc/ssl/certs/{{var_tlscert_existing_domain}}.pem > /etc/ssl/fullchains/{{var_tlscert_existing_domain}}.pem"
|
|
}
|
|
}
|
|
]
|