[mod] role:murmur:tls

This commit is contained in:
roydfalk 2024-06-10 16:35:52 +02:00
parent a3296a4023
commit 0f0640c027
3 changed files with 34 additions and 2 deletions

View file

@ -1,6 +1,8 @@
{ {
"var_murmur_database_path": "/var/lib/mumble-server/mumble-server.sqlite", "var_murmur_database_path": "/var/lib/mumble-server/mumble-server.sqlite",
"var_murmur_domain": "murmur.example.org",
"var_murmur_port": 64738, "var_murmur_port": 64738,
"var_murmur_welcome_text": "<br />Welcome to this server running <b>Murmur</b>.<br />Enjoy your stay!<br />", "var_murmur_welcome_text": "<br />Welcome to this server running <b>Murmur</b>.<br />Enjoy your stay!<br />",
"var_murmur_admin_password": "REPLACE_ME" "var_murmur_admin_password": "REPLACE_ME",
"var_murmur_tls": true
} }

View file

@ -9,6 +9,31 @@
] ]
} }
}, },
{
"name": "tls | directory",
"when": "{{var_murmur_tls}}",
"become": true,
"ansible.builtin.file": {
"state": "directory",
"path": "/var/murmur"
}
},
{
"name": "tls | files",
"when": "{{var_murmur_tls}}",
"become": true,
"loop": [
{"from": "/etc/ssl/private/{{var_murmur_domain}}.pem", "to": "/var/murmur/tls-key.pem"},
{"from": "/etc/ssl/fullchains/{{var_murmur_domain}}.pem", "to": "/var/murmur/tls-fullchain.pem"}
],
"ansible.builtin.copy": {
"state": "directory",
"remote_src": true,
"src": "{{item.from}}",
"dest": "{{item.to}}",
"mode": "0444"
}
},
{ {
"name": "configuration", "name": "configuration",
"become": true, "become": true,

View file

@ -242,8 +242,13 @@ allowping=true
; If you have a proper SSL certificate, you can provide the filenames here. ; If you have a proper SSL certificate, you can provide the filenames here.
; Otherwise, Murmur will create its own certificate automatically. ; Otherwise, Murmur will create its own certificate automatically.
;sslCert= {% if var_murmur_tls %}
sslKey=/var/murmurd/tls-key.pem
sslCert=/var/murmurd/tls-fullchain.pem
{% else %}
;sslKey= ;sslKey=
;sslCert=
{% endif %}
; If the keyfile specified above is encrypted with a passphrase, you can enter ; If the keyfile specified above is encrypted with a passphrase, you can enter
; it in this setting. It must be plaintext, so you may wish to adjust the ; it in this setting. It must be plaintext, so you may wish to adjust the