From 613e318a986cacee2651524638e33b0411641dec Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Fri, 3 Feb 2023 13:04:10 -0800 Subject: [PATCH] Fix ansible-lint no-jinja-when occurence Ansible lint 6.12.1 released a few hours ago and started enforcing this rule. Change-Id: Ibc84e4f3fb18331ff6e2eb01037254be65dc53f5 --- roles/promote-docker-image/tasks/promote-cleanup.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/promote-docker-image/tasks/promote-cleanup.yaml b/roles/promote-docker-image/tasks/promote-cleanup.yaml index 81b4cf98a..9b877a14b 100644 --- a/roles/promote-docker-image/tasks/promote-cleanup.yaml +++ b/roles/promote-docker-image/tasks/promote-cleanup.yaml @@ -11,7 +11,7 @@ when: - zj_docker_tag.name.startswith('change_') or zj_docker_tag.name.startswith(zuul.pipeline) # Was updated > 24 hours ago: - - "{{ ((ansible_date_time.iso8601 | regex_replace('^(....-..-..)T(..:..:..).*Z', '\\1 \\2') | to_datetime) - (zj_docker_tag.last_updated | regex_replace('^(....-..-..)T(..:..:..).*Z', '\\1 \\2') | to_datetime)).seconds > 86400 }}" + - "((ansible_date_time.iso8601 | regex_replace('^(....-..-..)T(..:..:..).*Z', '\\1 \\2') | to_datetime) - (zj_docker_tag.last_updated | regex_replace('^(....-..-..)T(..:..:..).*Z', '\\1 \\2') | to_datetime)).seconds > 86400" uri: url: "https://hub.docker.com/v2/repositories/{{ zj_image.repository }}/tags/{{ zj_docker_tag.name }}/" method: DELETE