From b0eb28721b1bfeec72f6fc4dfbf4d20e9a3f86a7 Mon Sep 17 00:00:00 2001 From: Aine <97398200+etkecc@users.noreply.github.com> Date: Mon, 29 Aug 2022 15:13:27 +0000 Subject: [PATCH] postmoogle: add admins (#2073) * postmoogle: add admins * postmoogle: update jija2 defaults * postmoogle: fix typo --- roles/matrix-bot-postmoogle/defaults/main.yml | 9 +++++++++ roles/matrix-bot-postmoogle/templates/env.j2 | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/roles/matrix-bot-postmoogle/defaults/main.yml b/roles/matrix-bot-postmoogle/defaults/main.yml index bcd401e73..a08c0f462 100644 --- a/roles/matrix-bot-postmoogle/defaults/main.yml +++ b/roles/matrix-bot-postmoogle/defaults/main.yml @@ -93,6 +93,15 @@ matrix_bot_postmoogle_federation: false # - @*:another.com matrix_bot_postmoogle_users: [] +# A list of admins +# Example set of rules: +# - @someone:example.com +# - @another:example.com +# - @bot.*:example.com +# - @*:another.com +matrix_bot_postmoogle_admins: + - "{{ matrix_admin }}" + # Sentry DSN matrix_bot_postmoogle_sentry: '' diff --git a/roles/matrix-bot-postmoogle/templates/env.j2 b/roles/matrix-bot-postmoogle/templates/env.j2 index 0bd337525..d73c1b6af 100644 --- a/roles/matrix-bot-postmoogle/templates/env.j2 +++ b/roles/matrix-bot-postmoogle/templates/env.j2 @@ -12,6 +12,7 @@ POSTMOOGLE_LOGLEVEL={{ matrix_bot_postmoogle_loglevel }} POSTMOOGLE_NOENCRYPTION={{ matrix_bot_postmoogle_noencryption }} POSTMOOGLE_NOOWNER={{ matrix_bot_postmoogle_noowner }} POSTMOOGLE_FEDERATION={{ matrix_bot_postmoogle_federation }} -POSTMOOGLE_USERS={{ matrix_bot_postmoogle_users | default('') | join(' ') }} +POSTMOOGLE_USERS={{ matrix_bot_postmoogle_users | join(' ') }} +POSTMOOGLE_ADMINS={{ matrix_bot_postmoogle_admins | join(' ') }} {{ matrix_bot_postmoogle_environment_variables_extension }}