why am I getting output when " when:
ansible_facts['lvm']['lvs']['lv_mysql'] is not defined"
---
- hosts: database
gather_facts: yes
tasks:
- name: check lv_mysql exists
debug:
msg: "LV_MYSQL not there"
when: ansible_facts['lvm']['lvs']['lv_mysql'] is not defined
- name: check lv_mysql exists
debug:
msg: "LV_MYSQL is there"
when: ansible_facts['lvm']['lvs']['lv_mysql'] is defined
output:
TASK [check lv_mysql exists]
**********************************************************************************************************
ok: [mhost5] => {
"msg": "LV_MYSQL not there"
}
TASK [check lv_mysql exists]
**********************************************************************************************************
skipping: [mhost5]
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CAJVhugJz5Wn%2BjokOWtAcN2p2guHTqM%2BrxV%2BztLYpQ-Zy%2BtYD_A%40mail.gmail.com.