New dashboard creation fails
Summary
When creating a new dashboard (i.e. no previous version of the dashboard had been already saved in Grafana), we get an interesting error:
fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'ansible.utils.unsafe_proxy.AnsibleUnsafeText object' has no attribute 'uid'\n\nThe error appears to have been in '/home/bdaca/Praca/ansible-playbooks/system-manager/roles/grafana/tasks/dashboards_add.yml': line 11, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: \"fetch existing dashboard: {{ _grafana_dashboard }}\"\n ^ here\nWe could be wrong, but this one looks like it might be an issue with\nmissing quotes. Always quote template expression brackets when they\nstart a value. For instance:\n\n with_items:\n - {{ foo }}\n\nShould be written as:\n\n with_items:\n - \"{{ foo }}\"\n"}
This probably has something to do with variable resolution and Ansible 2.8 and things.