Hi Manish, I was facing same issue yesterday. To troubleshoot the issue I have gathered the facts and observed that ansible_processor kind of variables are list and have to be referenced with .0 or .1
try this out ansible_processor. *0* On Fri, Oct 11, 2019 at 4:07 PM Manish Kumar <[email protected]> wrote: > Hi All, > > I am trying to compare the output marked in yellow and proceed if > condition is true but it is skipping with skip_reason": "Conditional > result was False". > > Please let me know how it can be achieved . > > --- > - hosts: localhost > tasks: > - name: System details > debug: msg="{{ item }}" > with_items: > - "{{ ansible_processor }}" > - "{{ ansible_processor_cores }}" > register: out > - name: verify > debug: msg="passed" > when: ansible_processor=="Intel(R) Xeon(R) Platinum 8175M CPU @ > 2.50GHz" > > > ok: [localhost] => (item=None) => { > > "msg": "Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz" > > } > > ok: [localhost] => (item=None) => { > > "msg": 1 > > } > > > > TASK [verify] > ****************************************************************** > > task path: /U01/automation/playbooks/Esm_java.yml:10 > > skipping: [localhost] => { > > "skip_reason": "Conditional result was False" > > } > > META: ran handlers > > META: ran handlers > > > > PLAY RECAP > ********************************************************************* > > localhost : ok=2 changed=0 unreachable=0 > failed=0 > > > > Thanks, > > Manish > > -- > 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/941ab553-52b8-4661-8d0c-da9033d0b359%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/941ab553-52b8-4661-8d0c-da9033d0b359%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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/CAG-N3P6OCAzVitc_qb06aAY%2BHLD1zcvXAb%3DNzyArD8eaqsZUsg%40mail.gmail.com.
