to access group_vars dictionary key is not working . please check the following playbook
task path: /root/mywork/stat.yml:9
fatal: [con1]: FAILED! => {
"msg": "The task includes an option with an undefined variable. The error was: 'MyVariable' is undefined\n\nThe error appears to have been in '/root/mywork/stat.yml': line 9, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n tasks:\n - debug:\n ^ here\n"
}
fatal: [con2]: FAILED! => {
"msg": "The task includes an option with an undefined variable. The error was: 'MyVariable' is undefined\n\nThe error appears to have been in '/root/mywork/stat.yml': line 9, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n tasks:\n - debug:\n ^ here\n"
}