Skip to content

Commit da1a7e0

Browse files
authored
DO500 notifications generation (#67)
1 parent a6dcaa0 commit da1a7e0

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

inventory-generation/notifications/main.yaml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,21 @@
2727
path: "{{ directory }}/iac/inventories/notifications/inventory/group_vars/all"
2828
state: directory
2929

30-
- name: "Copy email template directory to engagement repo and process as jinja2"
30+
- name: "Copy email template directory to Residency Engagement repo and process as jinja2"
3131
template:
3232
src: "{{ item }}"
3333
dest: "{{ directory }}/iac/inventories/notifications/inventory/group_vars/all/{{ item | basename | regex_replace('.j2$') }}"
3434
with_fileglob:
3535
- "{{ email_templates_directory }}/hosting/residency/{{ language | default('en_us') }}/*.j2"
36+
when: engagement_type | default('') == 'Residency'
37+
38+
- name: "Copy email template directory to DO500 Engagement repo and process as jinja2"
39+
template:
40+
src: "{{ item }}"
41+
dest: "{{ directory }}/iac/inventories/notifications/inventory/group_vars/all/{{ item | basename | regex_replace('.j2$') }}"
42+
with_fileglob:
43+
- "{{ email_templates_directory }}/hosting/do500/{{ language | default('en_us') }}/*.j2"
44+
when: engagement_type | default('') == 'DO500'
3645

3746
- name: "Create hosts file"
3847
copy:
@@ -42,10 +51,10 @@
4251
when:
4352
- notifications_dir.stat.exists is false
4453
- start_date is defined
45-
- engagement_type | default('') == 'Residency'
54+
- engagement_type | default('') == 'Residency' or engagement_type | default('') == 'DO500'
4655
- (hosting_environments is defined) and (hosting_environments | length > 0)
4756
- (archive_date | default('2006-01-02T15:04:05.000Z') | to_datetime('%Y-%m-%dT%H:%M:%S.%fZ')).strftime('%s') > now(utc=true).strftime('%s')
48-
57+
4958
- name: "Process list of users from template"
5059
template:
5160
src: list-of-users.yaml.j2

0 commit comments

Comments
 (0)