Skip to content

Commit

Permalink
Merge pull request #487 from ucb-rit/ansible_configure_email_admins
Browse files Browse the repository at this point in the history
Allow EMAIL_ADMIN_LIST to be configured in Ansible
  • Loading branch information
matthew-li authored Nov 9, 2022
2 parents 9a993e9 + 2d5c206 commit 4319d61
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ that quotes need not be provided, except in the list variable.
redis_passwd: password_here
from_email: [email protected]
admin_email: [email protected]
email_admin_list: ["[email protected]"]
request_approval_cc_list: ["[email protected]"]
```
8. Provision the VM. This should run the Ansible playbook. Expect this to take
Expand Down
20 changes: 16 additions & 4 deletions bootstrap/ansible/main.copyme
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,12 @@ sentry_dsn: ""
# # TODO: For LRC, use the substring 'MyLRC'.
# email_subject_prefix: '[MyBRC-User-Portal]'

# # A list of admin email addresses to be notified about new requests and other
# # events.
# # TODO: Set these addresses to yours.
# email_admin_list: []
# # A list of email addresses to CC when certain requests are processed.
# # TODO: Set this address to yours.
# # TODO: Set these addresses to yours.
# request_approval_cc_list: []

###############################################################################
Expand Down Expand Up @@ -224,9 +228,13 @@ sentry_dsn: ""
# # TODO: For LRC, use the substring 'MyLRC'.
# email_subject_prefix: '[MyBRC-User-Portal]'

# # A list of admin email addresses to be notified about new requests and other
# # events.
# # TODO: Set these addresses to yours.
# email_admin_list: []
# # A list of email addresses to CC when certain requests are processed.
# # TODO: Set this address to yours.
# request_approval_cc_list: ['[email protected]']
# # TODO: Set these addresses to yours.
# request_approval_cc_list: []

###############################################################################
# dev_settings
Expand Down Expand Up @@ -272,6 +280,10 @@ sentry_dsn: ""
# # TODO: For LRC, use the substring 'MyLRC'.
# email_subject_prefix: '[MyBRC-User-Portal]'

# # A list of admin email addresses to be notified about new requests and other
# # events.
# # TODO: Set these addresses to yours.
# email_admin_list: ['[email protected]']
# # A list of email addresses to CC when certain requests are processed.
# # TODO: Set this address to yours.
# # TODO: Set these addresses to yours.
# request_approval_cc_list: ['[email protected]']
4 changes: 3 additions & 1 deletion bootstrap/ansible/settings_template.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ CENTER_PROJECT_RENEWAL_HELP_URL = CENTER_BASE_URL + '/help'

EMAIL_PORT = {{ email_port }}
EMAIL_SUBJECT_PREFIX = '{{ email_subject_prefix }}'
EMAIL_ADMIN_LIST = ['admin@{{ hostname }}']
# A list of admin email addresses to be notified about new requests and other
# events.
EMAIL_ADMIN_LIST = {{ email_admin_list }} or ['admin@{{ hostname }}']
EMAIL_SENDER = '{{ from_email }}'
EMAIL_TICKET_SYSTEM_ADDRESS = 'help@{{ hostname }}'
EMAIL_DIRECTOR_EMAIL_ADDRESS = 'director@{{ hostname }}'
Expand Down
2 changes: 2 additions & 0 deletions coldfront/config/test_settings.py.sample
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ CENTER_PROJECT_RENEWAL_HELP_URL = CENTER_BASE_URL + '/help'

EMAIL_PORT = 1025
EMAIL_SUBJECT_PREFIX = '[MyBRC-User-Portal]'
# A list of admin email addresses to be notified about new requests and other
# events.
EMAIL_ADMIN_LIST = ['admin@localhost']
EMAIL_SENDER = '[email protected]'
EMAIL_TICKET_SYSTEM_ADDRESS = 'help@localhost'
Expand Down

0 comments on commit 4319d61

Please sign in to comment.