NETWAYS / ansible-collection-elasticstack

A collection to install and manage the Elastic Stack
GNU General Public License v3.0
9 stars 8 forks source link

Idempotence - Certificate expiration date fails on second run #161

Closed lcndsmr closed 1 year ago

lcndsmr commented 1 year ago

Hello :) The Task: netways.elasticstack.elasticsearch : Set the elasticsearch certificate expiration date in days fails on second run with the error message: "msg": "the field 'args' has an invalid value ({'elasticsearch_cert_expiration_days': \"{{ ((elasticsearch_cert_expiration_date.stdout | to_datetime('%b %d %H:%M:%S %Y %Z')) - (ansible_date_time.date | to_datetime('%Y-%m-%d'))).days }}\"}), and could not be converted to an dict.The error was: time data 'May 15 12:46:48 2026 GMT' does not match format '%b %d %H:%M:%S %Y %Z'

It works if i delete the certificates manually. Problems were on Debian 11 and Centos 8. It also fails in the logstash and kibana roles.

I can provide more info if needed.

widhalmt commented 1 year ago

I got the same problem with CentOS 7 and Elastic Stack 7.