Use a date pipe lookup, since sometime ansible_date_Time seems to be undefined...

Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
Patrick Uiterwijk 2018-08-20 17:33:42 +00:00
parent 7da76ce369
commit dcc9aa15d2

View file

@ -133,7 +133,7 @@
set_fact:
certs_to_sign: "{{certs_to_sign}} + [ '{{item.item.path}}' ]"
with_items: "{{ssh_cert_files.results}}"
when: "item.stat.exists and item.stat.mtime|int < (ansible_date_time.epoch|int - 25920000)"
when: "item.stat.exists and item.stat.mtime|int < (lookup('pipe', 'date date +%s')|int - 25920000)"
tags:
- basessh
- sshd_cert