Re: [ansible-project] skip_reason": "Conditional result was False".

2019-10-14 Thread Manish Kumar
Its working now while using ansible_processor .2 

On Monday, October 14, 2019 at 11:11:47 AM UTC+5:30, Manish Kumar wrote:
>
> I tried but same result it is skipping .   
>
> when: ansible_processor.0 =="Intel(R) Xeon(R) Platinum 8175M CPU @ 
> 2.50GHz" 
>
> On Friday, October 11, 2019 at 5:58:02 PM UTC+5:30, Srinivas Naram wrote:
>>
>> 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  
>> 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=2changed=0unreachable=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 ansible...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/ansible-project/941ab553-52b8-4661-8d0c-da9033d0b359%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/dc1cb714-64c9-4948-a8e7-d4d6976ec5b3%40googlegroups.com.


Re: [ansible-project] skip_reason": "Conditional result was False".

2019-10-14 Thread Vladimir Botka
On Fri, 11 Oct 2019 03:36:50 -0700 (PDT)
Manish Kumar  wrote:

>   - name: System details
> debug: msg="{{ item }}"
> with_items: 
> - "{{ ansible_processor }}"
> - "{{ ansible_processor_cores }}"
> register: out
> [...]
> ok: [localhost] => (item=None) => {
> 
> "msg": "Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz"
> 
> }
> 
> ok: [localhost] => (item=None) => {
> 
> "msg": 1
> 
> }

Could you explain the magic of printing "1" when the item is "None" ?

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/20191014084607.6475b970%40gmail.com.


pgpngCYHW7yCr.pgp
Description: OpenPGP digital signature


Re: [ansible-project] skip_reason": "Conditional result was False".

2019-10-13 Thread Manish Kumar
I tried but same result it is skipping .   

when: ansible_processor.0 =="Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz" 

On Friday, October 11, 2019 at 5:58:02 PM UTC+5:30, Srinivas Naram wrote:
>
> 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  > 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=2changed=0unreachable=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 ansible...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/941ab553-52b8-4661-8d0c-da9033d0b359%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/1b917170-8e98-4a97-aa40-649a95027a70%40googlegroups.com.


Re: [ansible-project] skip_reason": "Conditional result was False".

2019-10-11 Thread Srinivas Naram
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 
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=2changed=0unreachable=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 ansible-project+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/941ab553-52b8-4661-8d0c-da9033d0b359%40googlegroups.com
> 
> .
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAG-N3P6OCAzVitc_qb06aAY%2BHLD1zcvXAb%3DNzyArD8eaqsZUsg%40mail.gmail.com.


[ansible-project] skip_reason": "Conditional result was False".

2019-10-11 Thread Manish Kumar
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=2changed=0unreachable=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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/941ab553-52b8-4661-8d0c-da9033d0b359%40googlegroups.com.