Skip to content

Commit 05986b0

Browse files
wendaniyxieca
authored andcommitted
Use lookup('pipe', 'date +%H:%M:%S') in place of ansible_date_time.time (#1136)
* Use lookup('pipe', 'date +%H:%M:%S') in place of ansible_date_time.time, which uses cached time for a certain period of time ansible/ansible#22561 Signed-off-by: Wenda Ni <wenni@microsoft.com> * Addres comment Signed-off-by: Wenda Ni <wenni@microsoft.com>
1 parent 1a9d00d commit 05986b0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ansible/roles/test/files/tools/loganalyzer/loganalyzer_init.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
when: expect_file is not defined
1919

2020
- set_fact:
21-
testname_unique: "{{ testname }}.{{lookup('pipe','date +%Y-%m-%d-%H:%M:%S')}}"
22-
when: testname_unique is not defined
21+
testname_unique: "{{ testname }}.{{ lookup('pipe', 'date +%Y-%m-%d.%H:%M:%S') }}"
22+
when: testname_unique is not defined or (testname_unique_gen is defined and testname_unique_gen == true)
2323

2424
- set_fact:
2525
test_out_dir: "{{ out_dir }}/{{ testname_unique }}"

0 commit comments

Comments
 (0)