You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ansible...@googlegroups.com
Hi
I'm trying to use version compare in selectattr but get error message
"Version comparison failed: '<' not supported between instances of 'int'
and 'str'
This is the playboot I'm using
Version comparison failed: '<' not supported between instances of 'int'
and 'str'
Anyone have any idea how to do this?
--
Kai Stian Olstad
Todd Lewis
unread,
Mar 6, 2023, 10:24:44 AM3/6/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
That last expression is too quoty (and missing a close parenthesis). Try
{{ my | selectattr('vers', 'version', '5', '<') }}
Kai Stian Olstad
unread,
Mar 6, 2023, 10:30:31 AM3/6/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ansible...@googlegroups.com
On 06.03.2023 16:24, Todd Lewis wrote:
> That last expression is too quoty (and missing a close parenthesis).
> Try
>
> {{ my | selectattr('vers', 'version', '5', '<') }}
The missing parenthesis is just a typo, but removing the quotes work,
thanks Todd.
--
Kai Stian Olstad
Vladimir Botka
unread,
Mar 6, 2023, 10:40:10 AM3/6/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 'Kai Stian Olstad' via Ansible Project
On Mon, 06 Mar 2023 15:56:32 +0100
"'Kai Stian Olstad' via Ansible Project"