# Differences between systems

**URL:** <https://forum.ansible.com/t/differences-between-systems/23437>\
**Category:** Ansible Project\
**Tags:** rhel\
**Created:** [January 11, 2017, 9:18pm UTC](https://forum.ansible.com/t/differences-between-systems/23437 "2017-01-11T21:18:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tom\_Christopher](https://avatars.discourse-cdn.com/v4/letter/t/dfb087/32.png) [@Tom\_Christopher](https://forum.ansible.com/u/Tom_Christopher)\
**Post date:** [January 11, 2017, 9:18pm UTC](https://forum.ansible.com/t/differences-between-systems/23437/1 "2017-01-11T21:18:41Z")

</div>

Trying to set\_fact based on user input:

- set\_fact:  
wls\_bounce\_jvm: True  
when: bounce\_managed\_instance == True and deploy == True

On my Mac OSX system running version 2.1.2.0.1\_0 and 2.2.0.0.1\_0 works without issue.

If I run the same code on RHEL 6 version 2.1.0.0-1

The fact doesn’t get set, keeps skipping.

I have tried putting it all these different ways:

- set\_fact:  
wls\_bounce\_jvm: True  
when: bounce\_managed\_instance and deploy

and

- set\_fact:  
wls\_bounce\_jvm: True  
when: ( bounce\_managed\_instance == True ) and ( deploy == True )

When I had it set to “when: bounce\_managed\_instance and deploy” it started setting it to True but when I changed bounce\_managed\_instance to False it still kept returning True.

I don’t understand how it can be working differently between systems.

Has anyone else experienced this problem?

---

<div class="post-metadata">

**Author:** ![Johannes\_Kastl](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@Johannes\_Kastl](https://forum.ansible.com/u/Johannes_Kastl)\
**Post date:** [January 12, 2017, 10:02am UTC](https://forum.ansible.com/t/differences-between-systems/23437/2 "2017-01-12T10:02:22Z")

</div>

> Trying to set\_fact based on user input:
> 
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- set\_fact:  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wls\_bounce\_jvm: True  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;when: bounce\_managed\_instance == True and deploy == True

Are these boolean variables or are they set to the string "True" (with  
a capital T)? If the latter, then quote both like this:

&nbsp;&nbsp;when: 'bounce\_managed\_instance == "True" and deploy == "True" '

> On my Mac OSX system running version 2.1.2.0.1\_0 and 2.2.0.0.1\_0 works  
> without issue.
> 
> If I run the same code on RHEL 6 version 2.1.0.0-1
> 
> The fact doesn't get set, keeps skipping.

Add two debug tasks directly before your task and try again.

- debug: var="bounce\_managed\_instance"  
- debug: var="deploy"  
- set\_fact:  
...

My guess is that you are missing the quotes.

Johannes
