I moved this to https://github.com/ansible/ansible/issues/12071 


On Saturday, August 22, 2015 at 4:56:16 PM UTC-7, Patrick Heeney wrote:
>
>
> I have a role like below, that typecasts item.payment to an int. However 
> this appears to be converted back to a string. Ansible throws this error 
> "msg: value of payment_term must be one of: 1,12,24, got: 1" because it was 
> not a valid int. At the moment this is breaking the linode module or any 
> module that relies on an int with choices.
>
> - name: setup linode
>   linode:
>     name: '{{ item.name }}'
>     state: '{{ item.state | default("present") }}'
>     payment_term: '{{ item.payment | int | default(1) }}'
>     api_key: '{{ linode_api_key }}'
>   with_items: linode_servers
>   register: linode_response
>
> I think this may be related to 
> https://github.com/ansible/ansible/issues/5463
>
> It seems others are having the same issue with bools, but the ticket has 
> not received any official response.
>

-- 
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/7579c688-2aa7-4506-981b-6e02c935089d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to