Yep, this is *NOT* a bug but a feature, as you specified the variable as an int in the YAML, seeing it's without quotes.
On Wed, Sep 3, 2014 at 7:07 AM, Moti Heller <[email protected]> wrote: > Hi David, > > Thanks - this seems to help :) > > Moti. > > > On Wednesday, September 3, 2014 1:41:04 PM UTC+3, David Karban wrote: > >> Hi, >> >> maybe try: >> var_name: "01" >> >> David >> >> >> 2014-09-03 12:39 GMT+02:00 Moti Heller <[email protected]>: >> >>> Hi, >>> >>> I'm using the latest version of ansible. >>> I have a variable defined in my group_vars file as follows: >>> >>> var_name: 01 >>> >>> When using it in a task - {{var_name}}, the value is 1 instead of 01. >>> I require the value to be as is without ansible trying to convert it to >>> int. >>> I tried using {{var_name | string}} - with no success. >>> >>> Is this a bug or is there away to force ansible to treat the variable >>> value as is? >>> >>> Thanks, >>> Moti. >>> >>> -- >>> 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 post to this group, send email to [email protected]. >>> >>> To view this discussion on the web visit https://groups.google.com/d/ >>> msgid/ansible-project/aca8f209-a59b-4e2b-a992- >>> 32923226ef3f%40googlegroups.com >>> <https://groups.google.com/d/msgid/ansible-project/aca8f209-a59b-4e2b-a992-32923226ef3f%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> >> -- >> David Karban >> Specialista na správu linuxových serverů >> www.karban.eu >> > -- > 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 post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/602c79d9-df84-497c-910a-a67aad4c4f77%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/602c79d9-df84-497c-910a-a67aad4c4f77%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- 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 post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgzWuZOTuT43VjaNwBCfX2NPQJ31wj22ppZ5Tp-JdNzNLw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
