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/4cb63c96-a7ca-4c8d-ab9b-244a68be0334%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.