skipped role, register and with_items causing headaches

Hi All,

It seems like issues along these lines have been raised as bugs and closed several times… see https://github.com/ansible/ansible/issues/17500

I have created a role, which I intend to skip under certain circumstances. When the role is skipped, all tasks still run… OK… I don’t understand why this is desired behavior but that’s beside the point. I have ended up needing to put some very nasty looking “|default()” filters inside of my “with_items” clauses to get the playbook to run. Without the default values I end up with errors like ‘dict object’ has no attribute ‘stdout_lines’

Any other suggestions? I guess I can have different playbooks for different roles rather than skipping roles that I don’t want to use, but it seems a little cumbersome.

Thanks,
Paul

`