-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some chores #59
Some chores #59
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use_flake | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ | |
*.retry | ||
.vault_pass | ||
|
||
.direnv | ||
result |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
inputs = { | ||
nixpkgs.url="github:NixOS/nixpkgs/nixos-unstable"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
}; | ||
outputs = { self, nixpkgs, flake-utils }@inputs: | ||
flake-utils.lib.eachDefaultSystem (system: | ||
let pkgs = import nixpkgs { inherit system; }; | ||
in { | ||
devShells.default = pkgs.mkShell { | ||
packages = with pkgs; [ | ||
ansible | ||
ansible-lint | ||
]; | ||
PASSWORD_STORE_DIR="~/.password-store/chaos/jetzt"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure whether to include a |
||
}; | ||
}); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
--- | ||
mumble_domain: "mumble.{{ base_url }}" | ||
murmur_icesecretread: "secret" | ||
murmur_welcometext: "Welcome on the {{ base_url }}-mumble server running murmur. Enjoy your stay!" | ||
murmur_bandwidth: "128000" | ||
murmur_sslcert: "/etc/ssl/certs/mumble.{{ base_url }}.crt" | ||
murmur_sslkey: "/etc/ssl/private/mumble.{{ base_url }}.key" | ||
murmur_registername: no | ||
murmur_sslcert: "/etc/ssl/certs/{{ mumble_domain }}.crt" | ||
murmur_sslkey: "/etc/ssl/private/{{ mumble_domain }}.key" | ||
murmur_registername: false | ||
murmur_registry_password: "{{ lookup('passwordstore', 'infra/murmur/registry create=true') }}" | ||
|
||
mumble_web: yes | ||
mumble_web: true | ||
mumble_web_path: "/usr/lib/node_modules/mumble-web" | ||
mumble_web_config: "" | ||
mumble_web_supplementary_groups: "ssl-cert" | ||
mumble_web_listen: "127.0.0.1:84" | ||
mumble_web_ssl_activated: False | ||
mumble_web_ssl_target: True | ||
mumble_web_ssl_activated: false | ||
mumble_web_ssl_target: true |
+1 −0 | defaults/main.yml | |
+7 −1 | handlers/main.yml | |
+7 −7 | tasks/configure.yml | |
+4 −0 | tasks/download.yml |
+2 −0 | README.md | |
+2 −0 | meta/main.yml | |
+4 −0 | tasks/unattended-upgrades.yml | |
+1 −1 | templates/auto-upgrades.j2 | |
+1 −1 | templates/unattended-upgrades.j2 | |
+9 −0 | vars/Debian-bullseye.yml |
+5 −4 | .github/workflows/main.yml | |
+21 −0 | .yamllint | |
+4 −0 | defaults/main.yml | |
+1 −1 | meta/main.yml | |
+1 −0 | molecule/default/converge.yml | |
+2 −0 | molecule/default/molecule.yml | |
+8 −0 | molecule/default/prepare.yml | |
+2 −1 | molecule/docker/molecule.yml | |
+1 −0 | tasks/main.yml | |
+204 −153 | templates/turnserver.conf.j2 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[Unit] | ||
Description=Mumble certificate reloader | ||
|
||
[Service] | ||
Type=oneshot | ||
SyslogIdentifier=mumble-server-certificate-reloader | ||
ExecStart=/usr/local/bin/mumble-server-certificate-reloader {{ mumble_domain }} {{ murmur_port }} | ||
User={{ murmur_username }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
if ${DEBUG:-false}; then | ||
set -x | ||
fi | ||
set -E | ||
|
||
hostname=${1:-mumble.chaos.jetzt} | ||
port=${2:-64738} | ||
murmur_pid=$(cat /var/run/mumble-server/mumble-server.pid) | ||
reload_cmd=${3:-"kill -10 $murmur_pid"} | ||
now=$(date +"%s") | ||
in_one_week=$((now + 60*60*24*7)) | ||
${DRY_RUN:=false} | ||
|
||
# Checking if the certificate will expire in one week or less | ||
echo | openssl s_client -connect "${hostname}:${port}" -servername "${hostname}" -servername mumble.chaos.jetzt -attime ${in_one_week} -verify_return_error -verify 20 >/dev/null 2>&1 | ||
if [[ $? -ne 0 ]]; then | ||
echo "Reloading..." | ||
if ! $DRY_RUN; then | ||
$reload_cmd | ||
fi | ||
fi |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[Unit] | ||
Description=Mumble certificate reloader | ||
|
||
[Timer] | ||
OnCalendar=*-*-* *:13:37 | ||
Persistent=true | ||
|
||
[Install] | ||
WantedBy=timers.target |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When including a flake.nix in this repo, it would be probably better to just use
use flake
(cf. https://github.com/direnv/direnv/blob/master/man/direnv-stdlib.1.md#use-flake-installable)