# template expands on OSX but not on Linux

**URL:** <https://forum.ansible.com/t/template-expands-on-osx-but-not-on-linux/24699>\
**Category:** Ansible Project\
**Created:** [June 12, 2017, 3:04pm UTC](https://forum.ansible.com/t/template-expands-on-osx-but-not-on-linux/24699 "2017-06-12T15:04:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brian\_Fallik](https://avatars.discourse-cdn.com/v4/letter/b/ac91a4/32.png) [@Brian\_Fallik](https://forum.ansible.com/u/Brian_Fallik)\
**Post date:** [June 12, 2017, 3:04pm UTC](https://forum.ansible.com/t/template-expands-on-osx-but-not-on-linux/24699/1 "2017-06-12T15:04:39Z")

</div>

Hi,

I'm trying to build a playbook using set\_fact but the template seems  
to expand when I test locally on OSX but not when I invoke ansible via  
Jenkins on Linux. Here's the line:

&nbsp;&nbsp;&nbsp;&nbsp;- set\_fact:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;snapshot\_id: "production-snapshot-{{ 2000000000 | random |  
to\_uuid | replace('-', '') | truncate(12, end='') }}"

When I test this value gets set correctly to something like  
"production-snapshot-4d378e43eede". When I invoke this in Jenkins the  
value is "production-snapshot-". There's no other output or error  
message besides the truncated value.

Any idea what's going on here? Is this a bug?

brian
