mirror of
				https://github.com/kevinveenbirkenbach/computer-playbook.git
				synced 2025-11-04 04:08:15 +00:00 
			
		
		
		
	Added credentials for telegram bot
This commit is contained in:
		
							
								
								
									
										2
									
								
								roles/sys-alm-telegram/defaults/main.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								roles/sys-alm-telegram/defaults/main.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,2 @@
 | 
			
		||||
telegram_bot_token: ''  # The token of your telegram bot
 | 
			
		||||
telegram_chat_id: ''    # The id of your telegram chat 
 | 
			
		||||
@@ -1,3 +1,15 @@
 | 
			
		||||
- name: Fail if Telegram bot credentials are not set
 | 
			
		||||
  assert:
 | 
			
		||||
    that:
 | 
			
		||||
      - telegram_bot_token != ""
 | 
			
		||||
      - telegram_chat_id != ""
 | 
			
		||||
    fail_msg: |
 | 
			
		||||
      Telegram configuration is incomplete!
 | 
			
		||||
      Please provide non‑empty values for:
 | 
			
		||||
        - telegram_bot_token   # Your Telegram bot’s API token
 | 
			
		||||
        - telegram_chat_id     # The Telegram chat ID to send messages to
 | 
			
		||||
  when: run_once_systemd_notifier_telegram is not defined
 | 
			
		||||
 | 
			
		||||
- name: install curl
 | 
			
		||||
  pacman: 
 | 
			
		||||
    name: curl
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user