I am trying to use the Processors to print the result of every task and the subtasks of my main task. I am not understanding how I can use ‘nr.with_processors’ to filter on a particular type of hosts and also apply my custom processor for processing the results.
For e.g : I pass ‘role’ as an external variable. I could use the Filter function to filter out hosts by : devices = nr.filter(F(role=role))
However, the documentation says :
# similary to .filter, with_processors returns a copy of the nornir object but with’
# the processors assigned to it.
How can I use nr.with_processors to achieve the desired result.