# leading zero omitted from variable

**URL:** <https://forum.ansible.com/t/leading-zero-omitted-from-variable/19637>\
**Category:** Ansible Project\
**Created:** [October 28, 2015, 9:24am UTC](https://forum.ansible.com/t/leading-zero-omitted-from-variable/19637 "2015-10-28T09:24:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gregory\_Danenberg](https://avatars.discourse-cdn.com/v4/letter/g/7bcc69/32.png) [@Gregory\_Danenberg](https://forum.ansible.com/u/Gregory_Danenberg)\
**Post date:** [October 28, 2015, 9:24am UTC](https://forum.ansible.com/t/leading-zero-omitted-from-variable/19637/1 "2015-10-28T09:24:22Z")

</div>

Hi

In group\_vars I declared the following variables:

version:  
stf: 2.6.0.0  
build: 01.0

and later use it in tasks:

- name: copy task example

copy: src=/var/rpms/functions-{{version.stf}}-{{version.build}}.x86\_64.rpm dest=/tmp

When running the playbook I get this error:

msg: could not find src=/var/rpms/functions-2.6.0.0- **1.0**.x86\_64.rpm

when first zero is omitted from build variable

How can I fix that ?

Thanks  
Gregory

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [October 28, 2015, 2:10pm UTC](https://forum.ansible.com/t/leading-zero-omitted-from-variable/19637/2 "2015-10-28T14:10:57Z")

</div>

quote it

build: "01.0"

as a string it will not be" numerically simplified"

---

<div class="post-metadata">

**Author:** ![Gregory\_Danenberg](https://avatars.discourse-cdn.com/v4/letter/g/7bcc69/32.png) [@Gregory\_Danenberg](https://forum.ansible.com/u/Gregory_Danenberg)\
**Post date:** [November 1, 2015, 9:25am UTC](https://forum.ansible.com/t/leading-zero-omitted-from-variable/19637/3 "2015-11-01T09:25:05Z")

</div>

Thanks!

Its pretty strange, since this is the first thing I tried…and only now it worked for me…
