How do i extract certain characters of a string in ansible?



  • To extract certain characters from a string you can use the python code.

    mynewvariable: "{{ my_variable[3:6] }}"
    

    Would extract the "var" from my_variable.


Log in to reply
 

© Lightnetics 2024