I have a requirement where I have to extract/filter particular length of a string in ansible. For example:-
My node machine has following hostname:- jpujenkins, jpunessus.
So in fact variable we will have.
{{ ansible_hostname }} --> jpujenkins.
{{ ansible_hostname }} --> jpunessus
But I want to remove first three letter say 'jpu' from the all node hostname.
Desired output :- jenkins, nessus
Also can be capitalize the letter say JENKINS, NESSUS?