I noticed that defaults specified in one role’s scope become available in a second role’s scope if both roles are part of the same playbook. I wonder why these defaults do not stick to their role scope?
% ANSIBLE_PRIVATE_ROLE_VARS=True ansible-playbook -i localhost, playbook.yml --tags role2
PLAY [test] ****************************************************************************************************************************************************************************************
TASK [role_2 : debug] ***************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {
"msg": "The task includes an option with an undefined variable. The error was: 'snaap' is undefined.(omit)