Re: [ansible-project] YAML variable without using quotes?

2016-02-23 Thread RobL
I'm still seeing a repro of the bug.  Is this the commit you're referring 
to?
https://github.com/ansible/ansible/pull/10465

For this bug?
https://github.com/ansible/ansible/issues/9362



On Thursday, February 18, 2016 at 8:59:36 AM UTC-8, Brian Coca wrote:
>
> that is a bug in that version, it should work on 2.0 and above
>
> On Thu, Feb 18, 2016 at 8:54 AM, RobL  
> wrote:
>
>> ansible 1.9.0.1
>>
>>
>> On Thursday, February 18, 2016 at 8:32:20 AM UTC-8, Brian Coca wrote:
>>>
>>> what version of ansible?
>>>
>>> On Thu, Feb 18, 2016 at 8:17 AM, RobL  wrote:
>>>
 No, I'm still seeing the value being quoted:

 instances: "{{ groups['workers']|count|int }}"
 becomes:
"instances": "3",


 On Thursday, February 18, 2016 at 8:03:02 AM UTC-8, Brian Coca wrote:
>
>  "{{foo|int}}" should return a number
>
>
> --
> Brian Coca
>
 -- 
 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-proje...@googlegroups.com.
 To post to this group, send email to ansible...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/ansible-project/cf9c86d2-ade4-46a9-a8c4-0e04acbc7fe4%40googlegroups.com
  
 
 .

 For more options, visit https://groups.google.com/d/optout.

>>>
>>>
>>>
>>> -- 
>>> --
>>> Brian Coca
>>>
>> -- 
>> 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-proje...@googlegroups.com .
>> To post to this group, send email to ansible...@googlegroups.com 
>> .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/9a6de5af-08af-4a4a-958d-b94ce77edca2%40googlegroups.com
>>  
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> --
> Brian Coca
>

-- 
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 post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9321dfdc-895a-43ce-9883-7f15917b999f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] YAML variable without using quotes?

2016-02-19 Thread RobL
Brian, can you point me to the commit that should be fixing this bug?

Thanks!

-- 
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 post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/6aaab68c-55b6-4b12-80e9-f0ec51827cee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] YAML variable without using quotes?

2016-02-18 Thread RobL
I'm still seeing the same issue on Ansible 2.0.0.2.

-- 
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 post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/d88db2c9-9b5a-4c98-a553-c083d3ef7c15%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] YAML variable without using quotes?

2016-02-18 Thread Brian Coca
that is a bug in that version, it should work on 2.0 and above

On Thu, Feb 18, 2016 at 8:54 AM, RobL  wrote:

> ansible 1.9.0.1
>
>
> On Thursday, February 18, 2016 at 8:32:20 AM UTC-8, Brian Coca wrote:
>>
>> what version of ansible?
>>
>> On Thu, Feb 18, 2016 at 8:17 AM, RobL  wrote:
>>
>>> No, I'm still seeing the value being quoted:
>>>
>>> instances: "{{ groups['workers']|count|int }}"
>>> becomes:
>>>"instances": "3",
>>>
>>>
>>> On Thursday, February 18, 2016 at 8:03:02 AM UTC-8, Brian Coca wrote:

  "{{foo|int}}" should return a number


 --
 Brian Coca

>>> --
>>> 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-proje...@googlegroups.com.
>>> To post to this group, send email to ansible...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/ansible-project/cf9c86d2-ade4-46a9-a8c4-0e04acbc7fe4%40googlegroups.com
>>> 
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> --
>> Brian Coca
>>
> --
> 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 post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/9a6de5af-08af-4a4a-958d-b94ce77edca2%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
--
Brian Coca

-- 
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 post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CACVha7cpOyiqZ1HGZXeaodb702AdnVT_N5M7ae1hKmUXCWvinQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] YAML variable without using quotes?

2016-02-18 Thread RobL
ansible 1.9.0.1


On Thursday, February 18, 2016 at 8:32:20 AM UTC-8, Brian Coca wrote:
>
> what version of ansible?
>
> On Thu, Feb 18, 2016 at 8:17 AM, RobL  
> wrote:
>
>> No, I'm still seeing the value being quoted:
>>
>> instances: "{{ groups['workers']|count|int }}"
>> becomes:
>>"instances": "3",
>>
>>
>> On Thursday, February 18, 2016 at 8:03:02 AM UTC-8, Brian Coca wrote:
>>>
>>>  "{{foo|int}}" should return a number
>>>
>>>
>>> --
>>> Brian Coca
>>>
>> -- 
>> 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-proje...@googlegroups.com .
>> To post to this group, send email to ansible...@googlegroups.com 
>> .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/cf9c86d2-ade4-46a9-a8c4-0e04acbc7fe4%40googlegroups.com
>>  
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> --
> Brian Coca
>

-- 
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 post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9a6de5af-08af-4a4a-958d-b94ce77edca2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] YAML variable without using quotes?

2016-02-18 Thread Brian Coca
what version of ansible?

On Thu, Feb 18, 2016 at 8:17 AM, RobL  wrote:

> No, I'm still seeing the value being quoted:
>
> instances: "{{ groups['workers']|count|int }}"
> becomes:
>"instances": "3",
>
>
> On Thursday, February 18, 2016 at 8:03:02 AM UTC-8, Brian Coca wrote:
>>
>>  "{{foo|int}}" should return a number
>>
>>
>> --
>> Brian Coca
>>
> --
> 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 post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/cf9c86d2-ade4-46a9-a8c4-0e04acbc7fe4%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
--
Brian Coca

-- 
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 post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CACVha7ftSbBAvK4pHvdaRajWyHJKK%3D%3DXRBd6WO0rxXkgYCnPPQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] YAML variable without using quotes?

2016-02-17 Thread RobL
I'm hitting this error:


We could be wrong, but this one looks like it might be an issue with
missing quotes.  Always quote template expression brackets when they
start a value. For instance:

with_items:
  - {{ foo }}

Should be written as:

with_items:
  - "{{ foo }}"


The problem is that I'm converting the YAML to JSON, and I need the value 
(a number) to be unquoted in the JSON.

Is there any way I can avoid this error without quoting, or is there some 
way to remove the quotes when it's converted to JSON?

-- 
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 post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/87877629-bbac-448f-a47e-a04ba4ecffd4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.