{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/28321","labels_url":"https://api.github.com/repos/saltstack/salt/issues/28321/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/28321/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/28321/events","html_url":"https://github.com/saltstack/salt/issues/28321","id":113489435,"number":28321,"title":"passing variable through context broken on latest 2015.8","user":{"login":"jejenone","id":301667,"avatar_url":"https://avatars.githubusercontent.com/u/301667?v=3","gravatar_id":"","url":"https://api.github.com/users/jejenone","html_url":"https://github.com/jejenone","followers_url":"https://api.github.com/users/jejenone/followers","following_url":"https://api.github.com/users/jejenone/following{/other_user}","gists_url":"https://api.github.com/users/jejenone/gists{/gist_id}","starred_url":"https://api.github.com/users/jejenone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jejenone/subscriptions","organizations_url":"https://api.github.com/users/jejenone/orgs","repos_url":"https://api.github.com/users/jejenone/repos","events_url":"https://api.github.com/users/jejenone/events{/privacy}","received_events_url":"https://api.github.com/users/jejenone/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/saltstack/salt/labels/Bug","name":"Bug","color":"e11d21"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Core","name":"Core","color":"fef2c0"},{"url":"https://api.github.com/repos/saltstack/salt/labels/High%20Severity","name":"High Severity","color":"ff9143"},{"url":"https://api.github.com/repos/saltstack/salt/labels/P1","name":"P1","color":"2181ee"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Regression","name":"Regression","color":"e11d21"}],"state":"open","locked":false,"assignee":{"login":"basepi","id":702318,"avatar_url":"https://avatars.githubusercontent.com/u/702318?v=3","gravatar_id":"","url":"https://api.github.com/users/basepi","html_url":"https://github.com/basepi","followers_url":"https://api.github.com/users/basepi/followers","following_url":"https://api.github.com/users/basepi/following{/other_user}","gists_url":"https://api.github.com/users/basepi/gists{/gist_id}","starred_url":"https://api.github.com/users/basepi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basepi/subscriptions","organizations_url":"https://api.github.com/users/basepi/orgs","repos_url":"https://api.github.com/users/basepi/repos","events_url":"https://api.github.com/users/basepi/events{/privacy}","received_events_url":"https://api.github.com/users/basepi/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/saltstack/salt/milestones/68","html_url":"https://github.com/saltstack/salt/milestones/B%209","labels_url":"https://api.github.com/repos/saltstack/salt/milestones/68/labels","id":1332028,"number":68,"title":"B 9","description":"","creator":{"login":"meggiebot","id":12242451,"avatar_url":"https://avatars.githubusercontent.com/u/12242451?v=3","gravatar_id":"","url":"https://api.github.com/users/meggiebot","html_url":"https://github.com/meggiebot","followers_url":"https://api.github.com/users/meggiebot/followers","following_url":"https://api.github.com/users/meggiebot/following{/other_user}","gists_url":"https://api.github.com/users/meggiebot/gists{/gist_id}","starred_url":"https://api.github.com/users/meggiebot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meggiebot/subscriptions","organizations_url":"https://api.github.com/users/meggiebot/orgs","repos_url":"https://api.github.com/users/meggiebot/repos","events_url":"https://api.github.com/users/meggiebot/events{/privacy}","received_events_url":"https://api.github.com/users/meggiebot/received_events","type":"User","site_admin":false},"open_issues":33,"closed_issues":13,"state":"open","created_at":"2015-09-30T20:34:18Z","updated_at":"2015-11-04T16:10:31Z","due_on":"2015-11-10T07:00:00Z","closed_at":null},"comments":13,"created_at":"2015-10-27T02:03:58Z","updated_at":"2015-11-04T18:58:24Z","closed_at":null,"body":"Using this state:\r\n```\r\n{%- for city in cities %}\r\n{{ dbdir }}/{{city.iata}}/router.db:\r\n  file.managed:\r\n    - source: salt://rancid/templates/router.db.jinja\r\n    - template: jinja\r\n    - user: rancid\r\n    - group: rancid\r\n    - mode: 644\r\n    - context:\r\n        devices: {{ city.devices }}\r\n    - defaults:\r\n        matching:\r\n          junos: juniper\r\n          iosxr: cisco-xr\r\n          nxos: cisco-nx\r\n    - require:\r\n      - cmd: run-rancid-cvs\r\n{% endfor -%}\r\n```\r\n\r\n/srv/salt/rancid/templates/router.db.jinja:\r\n```\r\n# {{ pillar.get('managed_by_salt_message', '') }}\r\n{{ devices }}\r\n```\r\n\r\nWhile this is working perfectly on 2015.8.1 (and previous):\r\n\r\n\r\n```\r\n# MANAGED BY SALT -- DO NOT MODIFY\r\n[{'name': 'edge01.ord02', 'type': 'router', 'ip': '141.101.73.1', 'region': 'NA', 'os': 'junos'}, {'status': 'up', 'ip': '141.101.73.18', 'os': 'junos', 'name': 'core01.ord02', 'type': 'switch'}, {'status': 'up', 'ip': '141.101.73.21', 'os': 'pluribus', 'name': 'core02.ord02', 'type': 'switch'}, {'status': 'up', 'ip': '141.101.73.22', 'os': 'junos', 'name': 'core03.ord02', 'type': 'switch'}, {'status': 'down', 'ip': '141.101.73.34', 'os': 'nxos', 'name': 'core04.ord02', 'type': 'switch'}, {'status': 'up', 'ip': '141.101.73.36', 'os': 'nxos', 'name': 'core05.ord02', 'type': 'switch'}, {'status': 'down', 'ip': '141.101.73.20', 'os': 'junos', 'name': 'ms02.ord02', 'type': 'switch'}, {'status': 'up', 'ip': '141.101.73.35', 'os': 'junos', 'name': 'ms04.ord02', 'type': 'switch'}, {'status': 'up', 'ip': '141.101.73.37', 'os': 'junos', 'name': 'ms05.ord02', 'type': 'switch'}]\r\n```\r\n\r\n\r\nafter fetching latest 2015.8, this renders as:\r\n\r\n```\r\n# MANAGED BY SALT -- DO NOT MODIFY\r\n[{u\"u'os'\": u\"u'junos'\", u\"u'type'\": u\"u'router'\", u\"u'region'\": u\"u'NA'\", u\"u'ip'\": u\"u'141.101.73.1'\", u\"u'name'\": u\"u'edge01.ord02'\"}, {u\"u'os'\": u\"u'junos'\", u\"u'type'\": u\"u'switch'\", u\"u'ip'\": u\"u'141.101.73.18'\", u\"u'status'\": u\"u'up'\", u\"u'name'\": u\"u'core01.ord02'\"}, {u\"u'os'\": u\"u'pluribus'\", u\"u'type'\": u\"u'switch'\", u\"u'ip'\": u\"u'141.101.73.21'\", u\"u'status'\": u\"u'up'\", u\"u'name'\": u\"u'core02.ord02'\"}, {u\"u'os'\": u\"u'junos'\", u\"u'type'\": u\"u'switch'\", u\"u'ip'\": u\"u'141.101.73.22'\", u\"u'status'\": u\"u'up'\", u\"u'name'\": u\"u'core03.ord02'\"}, {u\"u'os'\": u\"u'nxos'\", u\"u'type'\": u\"u'switch'\", u\"u'ip'\": u\"u'141.101.73.34'\", u\"u'status'\": u\"u'down'\", u\"u'name'\": u\"u'core04.ord02'\"}, {u\"u'os'\": u\"u'nxos'\", u\"u'type'\": u\"u'switch'\", u\"u'ip'\": u\"u'141.101.73.36'\", u\"u'status'\": u\"u'up'\", u\"u'name'\": u\"u'core05.ord02'\"}, {u\"u'os'\": u\"u'junos'\", u\"u'type'\": u\"u'switch'\", u\"u'ip'\": u\"u'141.101.73.20'\", u\"u'status'\": u\"u'down'\", u\"u'name'\": u\"u'ms02.ord02'\"}, {u\"u'os'\": u\"u'junos'\", u\"u'type'\": u\"u'switch'\", u\"u'ip'\": u\"u'141.101.73.35'\", u\"u'status'\": u\"u'up'\", u\"u'name'\": u\"u'ms04.ord02'\"}, {u\"u'os'\": u\"u'junos'\", u\"u'type'\": u\"u'switch'\", u\"u'ip'\": u\"u'141.101.73.37'\", u\"u'status'\": u\"u'up'\", u\"u'name'\": u\"u'ms05.ord02'\"}]\r\n```\r\n\r\nnote the double unicode quoting, this is breaking everything.\r\n\r\nI identified the culprit commit to be https://github.com/saltstack/salt/commit/fadb954676f2627d7211e8fa723de65b539c9a7d \r\ncc @basepi "},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/153830542","html_url":"https://github.com/saltstack/salt/issues/28321#issuecomment-153830542","issue_url":"https://api.github.com/repos/saltstack/salt/issues/28321","id":153830542,"user":{"login":"basepi","id":702318,"avatar_url":"https://avatars.githubusercontent.com/u/702318?v=3","gravatar_id":"","url":"https://api.github.com/users/basepi","html_url":"https://github.com/basepi","followers_url":"https://api.github.com/users/basepi/followers","following_url":"https://api.github.com/users/basepi/following{/other_user}","gists_url":"https://api.github.com/users/basepi/gists{/gist_id}","starred_url":"https://api.github.com/users/basepi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basepi/subscriptions","organizations_url":"https://api.github.com/users/basepi/orgs","repos_url":"https://api.github.com/users/basepi/repos","events_url":"https://api.github.com/users/basepi/events{/privacy}","received_events_url":"https://api.github.com/users/basepi/received_events","type":"User","site_admin":false},"created_at":"2015-11-04T18:58:24Z","updated_at":"2015-11-04T18:58:24Z","body":"New issue here: #28582"}}