From 532bcf00c37fa7b66a2638529ab8ad3cd99b276b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A9ri=20Le=20Bouder?= Date: Mon, 31 Oct 2016 12:07:57 -0400 Subject: [PATCH] assign a default value to lecm_crons Ensure lecm_crons is always initialized to avoid error like this one (ansible 2.1.2): TASK [Spredzy.lecm : Configure the lecm crons (if desired)] ******************** [DEPRECATION WARNING]: Skipping task due to undefined Error, in the future this will be a fatal error.: 'lecm_crons' is undefined. --- defaults/main.yml | 2 ++ tasks/main.yml | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 9c41ecf..b641c0b 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -23,3 +23,5 @@ lecm_globals: {} # lecm certificates settings lecm_certificates: {} +# configuration for the cron module +lecm_crons: {} diff --git a/tasks/main.yml b/tasks/main.yml index 655c41e..5bf77ab 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -43,5 +43,4 @@ month={{ item.value.month | default('*') }} job={{ item.value.job | default('lecm --renew') }} state={{ item.value.state | default('present') }} - when: '{{ lecm_crons is defined }}' with_dict: '{{ lecm_crons }}'