here is my problem
I run a playbook on jenkins with extra variables, I want to test in my playbook is variables are defined
ansible [core 2.12.1] , jenkins plugin 1.1
here is the command from jenkins :
ansible-playbook create_user.yml -i hosts -e Site=UK -e BU=Test -e date_exp=
my code for testing is below
- name: Set expiration date
when : not date_exp
set_fact:
date_exp: "01/01/2024"
- name: Expiration date
debug:
msg:
- "{{ date_exp}}"
tried so many things: not , is undefined , =="" nothing works
date_exp=
to be recognized asFalse
?