that may not be possible as all of this are string under *register.stdout_lines*
On Friday, May 14, 2021 at 9:01:50 PM UTC+5:30 new_ansible wrote: > Can uou use >= with 1000 > > On Fri, May 14, 2021, 8:53 PM Amit Chettri <[email protected]> wrote: > >> Hello, >> >> I am able to do the assert using basic string check. But i am looking for >> a way to do using regex. >> >> example. >> i have register: result with below value >> *"stdout_lines": [* >> * "microsoft (R) Windows Script Host Version 5.812",* >> * "Copyright (C) Microsoft Corporation. All rights reserved.",* >> * "Software licensing service version: 10.0.17763.107",* >> * "Name: Windows(R), ServerStandard edition",* >> * "Description: Windows(R) Operating System, VOLUME_MAK >> channel",* >> * "Activation ID: xxxxxxxx-e4b1-483b-81e8-xxxxxxx",* >> * "Application ID: xxxxxxx-d682-4d71-983e-xxxxxxx",* >> * "Extended PID: >> 03612-xxxxxx-071-xxxxxx-03-1033-1xxx7763.0000-xxxxx",* >> * "Product Key Channel: Volume:MAK",* >> * "Installation ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxx",* >> * "Use License URL: >> https://activation-ssssssssssssssss?configextension=Retail >> <https://activation-ssssssssssssssss?configextension=Retail>",* >> * "Validation URL: >> https://validation-v2.sls.microsoft.com/SLWGA/slwga.asmx >> <https://validation-v2.sls.microsoft.com/SLWGA/slwga.asmx>",* >> * "Partial Product Key: djkahdjka",* >> * "License Status: Licensed",* >> * "Remaining Windows rearm count: 1000",* >> * "Remaining SKU rearm count: 1001",* >> * "Trusted time: 5/13/2021 2:51:47 PM"* >> * ]* >> >> using the code as below i am able to do the assert >> - assert: >> that: >> - "'License Status: Licensed' in result.stdout_lines" >> - "'Product Key Channel: Volume:MAK'" >> - "' *Remaining Windows rearm count: 1000* ' in >> result.stdout_lines" >> success_msg: "activated" >> fail_msg: "not activated" >> >> My problem is that i "*Remaining Windows rearm count" *can be between >> 1000-2000, do we have way to get this check as right now its static to >> >> *1000regards* >> *Amit* >> >> -- >> 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/940bb086-cb7c-4cfc-907e-094c28e32cecn%40googlegroups.com >> >> <https://groups.google.com/d/msgid/ansible-project/940bb086-cb7c-4cfc-907e-094c28e32cecn%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- 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/9b7dffce-8897-467f-b824-cab2f8a91c91n%40googlegroups.com.
