On Tue, 27 Oct 2020 at 20:47, [email protected]
<[email protected]> wrote:
>
> Can someone point me in the right direction
>
> ansible_devices['sda']['size'] returns "X GB"
>
> How can I use a when statement to perform something
>
> when: x> variable
>
> Do I need to convert "X GB" to a number
yes, to a float to be precise.
try something like this:
when: ansible_devices['sda'].size.split(' ')[0]|float > 18
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/3032c378-0da7-456d-a493-17154f94fa79n%40googlegroups.com.
--
Dick Visser
Trust & Identity Service Operations Manager
GÉANT
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CAL8fbwO%2B0uhUfKRt9tUXzpC85VqxaJO29x_uUTFrKp7Ote_Dkw%40mail.gmail.com.