why am I getting output when " when: ansible_facts[‘lvm’][‘lvs’][‘lv_mysql’] is not defined"
Well,
Someone else might have a clearer answer, but the way you coded it, the task would be skipped if ln_mysql is not defined. Did you try adding some verbosity to the ansible-playbook command? When something like this happens to me, I go right for the -vvvv and that will usually point me in the right direction.
–John