{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/26114","labels_url":"https://api.github.com/repos/saltstack/salt/issues/26114/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/26114/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/26114/events","html_url":"https://github.com/saltstack/salt/issues/26114","id":99730321,"number":26114,"title":"salt winrepo with jinja 'parses' differently - how to overcome?","user":{"login":"TheBigBear","id":471105,"avatar_url":"https://avatars.githubusercontent.com/u/471105?v=3","gravatar_id":"","url":"https://api.github.com/users/TheBigBear","html_url":"https://github.com/TheBigBear","followers_url":"https://api.github.com/users/TheBigBear/followers","following_url":"https://api.github.com/users/TheBigBear/following{/other_user}","gists_url":"https://api.github.com/users/TheBigBear/gists{/gist_id}","starred_url":"https://api.github.com/users/TheBigBear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheBigBear/subscriptions","organizations_url":"https://api.github.com/users/TheBigBear/orgs","repos_url":"https://api.github.com/users/TheBigBear/repos","events_url":"https://api.github.com/users/TheBigBear/events{/privacy}","received_events_url":"https://api.github.com/users/TheBigBear/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/High%20Severity","name":"High Severity","color":"ff9143"},{"url":"https://api.github.com/repos/saltstack/salt/labels/P3","name":"P3","color":"0a3d77"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Platform","name":"Platform","color":"fef2c0"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Windows","name":"Windows","color":"006b75"}],"state":"open","locked":false,"assignee":{"login":"twangboy","id":9383935,"avatar_url":"https://avatars.githubusercontent.com/u/9383935?v=3","gravatar_id":"","url":"https://api.github.com/users/twangboy","html_url":"https://github.com/twangboy","followers_url":"https://api.github.com/users/twangboy/followers","following_url":"https://api.github.com/users/twangboy/following{/other_user}","gists_url":"https://api.github.com/users/twangboy/gists{/gist_id}","starred_url":"https://api.github.com/users/twangboy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twangboy/subscriptions","organizations_url":"https://api.github.com/users/twangboy/orgs","repos_url":"https://api.github.com/users/twangboy/repos","events_url":"https://api.github.com/users/twangboy/events{/privacy}","received_events_url":"https://api.github.com/users/twangboy/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/saltstack/salt/milestones/13","html_url":"https://github.com/saltstack/salt/milestones/Approved","labels_url":"https://api.github.com/repos/saltstack/salt/milestones/13/labels","id":9265,"number":13,"title":"Approved","description":"All issues that are ready to be worked on, both bugs and features.","creator":{"login":"thatch45","id":507599,"avatar_url":"https://avatars.githubusercontent.com/u/507599?v=3","gravatar_id":"","url":"https://api.github.com/users/thatch45","html_url":"https://github.com/thatch45","followers_url":"https://api.github.com/users/thatch45/followers","following_url":"https://api.github.com/users/thatch45/following{/other_user}","gists_url":"https://api.github.com/users/thatch45/gists{/gist_id}","starred_url":"https://api.github.com/users/thatch45/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thatch45/subscriptions","organizations_url":"https://api.github.com/users/thatch45/orgs","repos_url":"https://api.github.com/users/thatch45/repos","events_url":"https://api.github.com/users/thatch45/events{/privacy}","received_events_url":"https://api.github.com/users/thatch45/received_events","type":"User","site_admin":false},"open_issues":2487,"closed_issues":2461,"state":"open","created_at":"2011-05-14T04:00:56Z","updated_at":"2015-08-17T18:15:36Z","due_on":null,"closed_at":null},"comments":12,"created_at":"2015-08-07T21:04:44Z","updated_at":"2015-08-17T18:16:25Z","closed_at":null,"body":"@UtahDave @jfindlay I have the following new winrepo sls file with jinja and just can't get the proper quoting, to get the right output, can one of you help me out with this, sorry if this is a really simple jinja and quoting related issue.\r\n\r\n```install_flags: '/S /D=\"{{ PROGRAM_FILES }}\\7-zip_beta\"'``` \r\n\r\nrenders as:\r\n\r\n```\r\ninstall_flags:\r\n    /S /D=\"C:\\Program Files\\7-zip_beta\" \r\n```\r\n\r\nWhich looks perfectly fine to me, but when it get's executed it is broken-up in an un-expected way, the space between ```Program``` and ```Files``` suddenly breaks up the params passed, even though it is in between double-quotes.\r\n\r\n```\r\n, '/S', '/D=\"C:\\\\Program', 'Files\\\\7-zip_beta\"'\r\n```\r\n\r\n\r\n```\r\n7zip_beta.sls:\r\n```\r\n\r\n```\r\n{% if grains['cpuarch'] == 'AMD64' %}\r\n    {% set PROGRAM_FILES = \"C:\\Program Files\" %}\r\n{% else %}\r\n    {% set PROGRAM_FILES = \"C:\\Program Files (x86)\" %}\r\n{% endif %}\r\n7zip_beta:\r\n  15.05:\r\n    {% if grains['cpuarch'] == 'AMD64' %}\r\n    full_name: '7-Zip 15.05 beta x64'\r\n    installer: 'http://heanet.dl.sourceforge.net/project/sevenzip/7-Zip/15.05/7z1505-x64.exe'\r\n    {% elif grains['cpuarch'] == 'x86' %}\r\n    full_name: '7-Zip 15.05 beta'\r\n    installer: 'http://heanet.dl.sourceforge.net/project/sevenzip/7-Zip/15.05/7z1505.exe'\r\n    {% endif %}\r\n    install_flags: '/S /D=\"{{ PROGRAM_FILES }}\\7-zip_beta\"'\r\n    uninstaller: '{{ PROGRAM_FILES }}\\7-zip_beta\\Uninstall.exe' \r\n    uninstall_flags: '/S'\r\n    reboot: False\r\n    locale: en_US\r\n```\r\n\r\nHere is the ```-l info``` level output\r\n\r\n```\r\nC:\\salt>salt-call --local pkg.install 7zip_beta -l info\r\n[WARNING ] Specified file http://heanet.dl.sourceforge.net/project/sevenzip/7-Zip/15.05/7z1505-x64.exe is not present to generate hash\r\n[INFO    ] Executing command ['c:\\\\salt\\\\var\\\\cache\\\\salt\\\\minion\\\\extrn_files\\\\base\\\\heanet.dl.sourceforge.net\\\\project\\\\sevenzip\\\\7-Zip\\\\15.05\\\\7z1505-x64.exe', '/S', '/D=\"C:\\\\Program', 'Files\\\\7-zip_beta\"'] in directory 'c:\\\\salt\\\\var\\\\cache\\\\salt\\\\minion\\\\extrn_files\\\\base\\\\heanet.dl.sourceforge.net\\\\project\\\\sevenzip\\\\7-Zip\\\\15.05'\r\n[ERROR   ] Command ['c:\\\\salt\\\\var\\\\cache\\\\salt\\\\minion\\\\extrn_files\\\\base\\\\heanet.dl.sourceforge.net\\\\project\\\\sevenzip\\\\7-Zip\\\\15.05\\\\7z1505-x64.exe', '/S', '/D=\"C:\\\\Program', 'Files\\\\7-zip_beta\"'] failed with return code: 1\r\n[ERROR   ] output:\r\nlocal:\r\n    ----------\r\n```\r\nHow do I have to write this winrepo sls file with jinja to get the right output?\r\n"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/131914098","html_url":"https://github.com/saltstack/salt/issues/26114#issuecomment-131914098","issue_url":"https://api.github.com/repos/saltstack/salt/issues/26114","id":131914098,"user":{"login":"twangboy","id":9383935,"avatar_url":"https://avatars.githubusercontent.com/u/9383935?v=3","gravatar_id":"","url":"https://api.github.com/users/twangboy","html_url":"https://github.com/twangboy","followers_url":"https://api.github.com/users/twangboy/followers","following_url":"https://api.github.com/users/twangboy/following{/other_user}","gists_url":"https://api.github.com/users/twangboy/gists{/gist_id}","starred_url":"https://api.github.com/users/twangboy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twangboy/subscriptions","organizations_url":"https://api.github.com/users/twangboy/orgs","repos_url":"https://api.github.com/users/twangboy/repos","events_url":"https://api.github.com/users/twangboy/events{/privacy}","received_events_url":"https://api.github.com/users/twangboy/received_events","type":"User","site_admin":false},"created_at":"2015-08-17T18:16:25Z","updated_at":"2015-08-17T18:16:25Z","body":"It looks like `extra_install_flags` becomes a part of `install_flags` which then goes through your shlex.split.\r\n\r\n`extra_uninstall_flags` doesn't, so I would say to do `extra_uninstall_flags`"}}