Optimized TELEGRAM_BOT implementation

This commit is contained in:
2025-12-04 10:35:45 +01:00
parent 7847d5fddc
commit 651038a7c5
4 changed files with 19 additions and 11 deletions

View File

@@ -1,13 +1,13 @@
- name: Fail if Telegram bot credentials are not set
assert:
that:
- telegram_bot_token != ""
- telegram_chat_id != ""
- TELEGRAM_BOT_TOKEN != ""
- TELEGRAM_CHAT_ID != ""
fail_msg: |
Telegram configuration is incomplete!
Please provide nonempty values for:
- telegram_bot_token # Your Telegram bots API token
- telegram_chat_id # The Telegram chat ID to send messages to
- TELEGRAM_BOT_TOKEN # Your Telegram bots API token
- TELEGRAM_CHAT_ID # The Telegram chat ID to send messages to
when: MODE_ASSERT | bool
- include_role: