with_nested and when condition

I’m trying to write a play that allows for me to only build certain directories conditionally while using the with_nested.

Here’s my variable dictionary:

routers:
  router1:
    hostname: adam
  router2:
    hostname: steve

Here's my play: