Skip to content

Commit 7273298

Browse files
authored
Changed set_fact from list to dictionary (#97)
1 parent 98aaf0a commit 7273298

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

inventory-generation/notifications/main.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222

2323
- name: "Pre-process timestamps"
2424
set_fact:
25-
- archive_date_in_seconds: "{{ (archive_date | default('2000-01-01T') | regex_replace('^(.*)T.*$', '\\1') | to_datetime('%Y-%m-%d')).strftime('%s') }}"
26-
- time_now_in_seconds: "{{ now(utc=true, fmt='%s') }}"
25+
archive_date_in_seconds: "{{ (archive_date | default('2000-01-01T') | regex_replace('^(.*)T.*$', '\\1') | to_datetime('%Y-%m-%d')).strftime('%s') }}"
26+
time_now_in_seconds: "{{ now(utc=true, fmt='%s') }}"
2727

2828
- name: "Copy email templates from main repo to engagement repo - if the target directory does NOT already exist"
2929
block:

inventory-generation/tower_jobs_launch/main.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
- name: 'Pre-process timestamps'
1919
set_fact:
20-
- archive_date_in_seconds: "{{ (archive_date | default('2000-01-01T') | regex_replace('^(.*)T.*$', '\\1') | to_datetime('%Y-%m-%d')).strftime('%s') }}"
21-
- time_now_in_seconds: "{{ now(utc=true, fmt='%s') }}"
20+
archive_date_in_seconds: "{{ (archive_date | default('2000-01-01T') | regex_replace('^(.*)T.*$', '\\1') | to_datetime('%Y-%m-%d')).strftime('%s') }}"
21+
time_now_in_seconds: "{{ now(utc=true, fmt='%s') }}"
2222

2323
- name: 'Set facts to bootstrap scheduled notifications into Ansible Tower'
2424
set_fact:

inventory-generation/tower_jobs_schedules/main.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919

2020
- name: 'Pre-process timestamps'
2121
set_fact:
22-
- archive_date_in_seconds: "{{ (archive_date | default('2000-01-01T') | regex_replace('^(.*)T.*$', '\\1') | to_datetime('%Y-%m-%d')).strftime('%s') }}"
23-
- time_now_in_seconds: "{{ now(utc=true, fmt='%s') }}"
22+
archive_date_in_seconds: "{{ (archive_date | default('2000-01-01T') | regex_replace('^(.*)T.*$', '\\1') | to_datetime('%Y-%m-%d')).strftime('%s') }}"
23+
time_now_in_seconds: "{{ now(utc=true, fmt='%s') }}"
2424

2525
- name: 'Residency Engagement Type inventory'
2626
block:

0 commit comments

Comments
 (0)