Skip to content

Commit

Permalink
Merge pull request #1725 from tactilenews/make_all_messengers_optional
Browse files Browse the repository at this point in the history
Make all messengers optional
  • Loading branch information
roschaefer authored Jan 9, 2024
2 parents 4ea4001 + 4ef81a0 commit 1e00c3a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
10 changes: 5 additions & 5 deletions ansible/generate_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ rails:
environment: production
hundred_eyes_project_name: 100eyes
threema:
api_identity: # (REQUIRED) your threema ID
api_secret: # (REQUIRED) your threema Secret
private_key: # (REQUIRED) your threema private key *without* `private:` prefix
api_identity:
api_secret:
private_key: # your threema private key *without* `private:` prefix
telegram_bot:
api_key: # (REQUIRED) your telegram API token
username: # (REQUIRED) your telegram bot name, e.g. 'HundredEyesBot'
api_key:
username: your telegram bot name, e.g. 'HundredEyesBot'
postmark:
api_token: # (REQUIRED) API token for your new Postmark server
transactional_stream: "outbound"
Expand Down
15 changes: 5 additions & 10 deletions ansible/roles/installation/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
DOCKER_IMAGE_TAG: "{{ docker_image_tag }}"
RAILS_ENV: "{{ rails.environment }}"
HUNDRED_EYES_PROJECT_NAME: "{{ rails.hundred_eyes_project_name }}"
TELEGRAM_BOT_API_KEY: "{{ rails.telegram_bot.api_key }}"
TELEGRAM_BOT_USERNAME: "{{ rails.telegram_bot.username }}"
TELEGRAM_BOT_API_KEY: "{{ rails.telegram_bot.api_key | default('') }}"
TELEGRAM_BOT_USERNAME: "{{ rails.telegram_bot.username | default('') }}"
POSTGRES_HOST: "{{ postgres_host }}"
POSTGRES_PORT: "{{ postgres_port }}"
POSTGRES_USER: "{{ postgres_user }}"
Expand All @@ -41,9 +41,9 @@
SECRET_KEY_BASE: "{{ rails.secret_key_base }}"
RAILS_INBOUND_EMAIL_PASSWORD: "{{ rails.inbound_email_password }}"
CF_DNS_API_TOKEN: "{{ traefik.cloudflare_dns_api_token }}"
THREEMARB_API_IDENTITY: "{{ rails.threema.api_identity }}"
THREEMARB_API_SECRET: "{{ rails.threema.api_secret }}"
THREEMARB_PRIVATE: "{{ rails.threema.private_key }}"
THREEMARB_API_IDENTITY: "{{ rails.threema.api_identity | default('') }}"
THREEMARB_API_SECRET: "{{ rails.threema.api_secret | default('') }}"
THREEMARB_PRIVATE: "{{ rails.threema.private_key | default('') }}"
SIGNAL_SERVER_PHONE_NUMBER: "{{ rails.signal.server_phone_number | default('') }}"
SIGNAL_MONITORING_URL: "{{ rails.signal.monitoring_url | default('') }}"
SENTRY_DSN: "{{ rails.sentry.dsn }}"
Expand Down Expand Up @@ -76,8 +76,3 @@
command:
cmd: docker-compose -f docker-compose.yml -f docker-compose.prod.yml exec app bin/rails db:migrate
chdir: /home/ansible

- name: Set Telegram webhook
command:
cmd: docker-compose -f docker-compose.yml -f docker-compose.prod.yml exec app bin/rails telegram:bot:set_webhook
chdir: /home/ansible
5 changes: 5 additions & 0 deletions ansible/roles/telegram/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
- name: Set Telegram webhook
command:
cmd: docker-compose -f docker-compose.yml -f docker-compose.prod.yml exec app bin/rails telegram:bot:set_webhook
chdir: /home/ansible

0 comments on commit 1e00c3a

Please sign in to comment.