{"action":"closed","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/17913","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/17913/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/17913/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/17913/events","html_url":"https://github.com/ansible/ansible/issues/17913","id":181257952,"number":17913,"title":"safe_eval() warning for variables containing curly braces and Jinja2 expressions","user":{"login":"grgi","id":6435815,"avatar_url":"https://avatars.githubusercontent.com/u/6435815?v=3","gravatar_id":"","url":"https://api.github.com/users/grgi","html_url":"https://github.com/grgi","followers_url":"https://api.github.com/users/grgi/followers","following_url":"https://api.github.com/users/grgi/following{/other_user}","gists_url":"https://api.github.com/users/grgi/gists{/gist_id}","starred_url":"https://api.github.com/users/grgi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grgi/subscriptions","organizations_url":"https://api.github.com/users/grgi/orgs","repos_url":"https://api.github.com/users/grgi/repos","events_url":"https://api.github.com/users/grgi/events{/privacy}","received_events_url":"https://api.github.com/users/grgi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.2","name":"affects_2.2","color":"5319e7"},{"url":"https://api.github.com/repos/ansible/ansible/labels/bug_report","name":"bug_report","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-05T20:31:10Z","updated_at":"2016-10-21T02:49:49Z","closed_at":"2016-10-21T02:49:49Z","body":"##### ISSUE TYPE\r\n - Bug Report\r\n\r\n##### COMPONENT NAME\r\n`template/safe_eval`\r\n\r\n##### ANSIBLE VERSION\r\n```\r\nansible 2.2.0.0\r\n  config file = \r\n  configured module search path = Default w/o overrides\r\n```\r\n##### SUMMARY\r\nThere is a strange `safe_eval()` warning if one wants to template a string containing Jinja2 expressions and curly braces. Even escaping the curly braces like `{{ '{}' }}` does not help.\r\n\r\n##### STEPS TO REPRODUCE\r\n```\r\n- hosts: localhost\r\n  vars:\r\n    foo: \"bar\"\r\n  tasks:\r\n    - debug: msg=\"{}/{{ foo }}\"\r\n```\r\n##### EXPECTED RESULTS\r\nApart from the warning the expected results coincide with the actual ones.\r\n\r\n##### ACTUAL RESULTS\r\n```\r\nPLAY [localhost] ***************************************************************\r\n\r\nTASK [setup] *******************************************************************\r\nok: [localhost]\r\n\r\nTASK [debug] *******************************************************************\r\n [WARNING]: Exception in safe_eval() on expr: {}/bar (name 'bar' is not defined)\r\n\r\nok: [localhost] => {\r\n    \"msg\": \"{}/bar\"\r\n}\r\n\r\nPLAY RECAP *********************************************************************\r\nlocalhost                  : ok=2    changed=0    unreachable=0    failed=0   \r\n```\r\n"}}
{"actor":{"display_login":"jctanner"}}