{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/45901","repository_url":"https://api.github.com/repos/saltstack/salt","labels_url":"https://api.github.com/repos/saltstack/salt/issues/45901/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/45901/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/45901/events","html_url":"https://github.com/saltstack/salt/issues/45901","id":295248842,"number":45901,"title":"Import map.jinja from gitfs_remotes (TemplateNotFound: salt://nginx/conf/map.jinja)","user":{"login":"kislik","id":11527999,"avatar_url":"https://avatars2.githubusercontent.com/u/11527999?v=4","gravatar_id":"","url":"https://api.github.com/users/kislik","html_url":"https://github.com/kislik","followers_url":"https://api.github.com/users/kislik/followers","following_url":"https://api.github.com/users/kislik/following{/other_user}","gists_url":"https://api.github.com/users/kislik/gists{/gist_id}","starred_url":"https://api.github.com/users/kislik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kislik/subscriptions","organizations_url":"https://api.github.com/users/kislik/orgs","repos_url":"https://api.github.com/users/kislik/repos","events_url":"https://api.github.com/users/kislik/events{/privacy}","received_events_url":"https://api.github.com/users/kislik/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-07T18:42:41Z","updated_at":"2018-02-07T18:53:49Z","closed_at":"2018-02-07T18:53:49Z","author_association":"NONE","body":"### Description of Issue/Question\r\nCan i import variable inside state from map.jinja? If it store map.jinja in \"salt://\" path?\r\n**BUT**:\r\n\r\n> I use gitfs_remotes\r\n\r\n```\r\ngitfs_remotes:\r\n    - ssh://git@git.my-domain.com:8080/my-project/nginx.git:\r\n      - base: master\r\n      - mountpoint: salt://nginx\r\n\r\n```\r\n### Setup\r\n> and i try execute in init.sls\r\n\r\n`{% from \"salt://nginx/conf/map.jinja\" import nginx %}\r\n`\r\n\r\n### And i get\r\n```\r\n  File \"/usr/lib/python2.7/dist-packages/salt/utils/jinja.py\", line 135, in get_source\r\n    raise TemplateNotFound(template)\r\nTemplateNotFound: salt://nginxi/conf/map.jinja\r\n```\r\n\r\n\r\n### Versions Report\r\n2016.11.3+ds-1"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/363871856","html_url":"https://github.com/saltstack/salt/issues/45901#issuecomment-363871856","issue_url":"https://api.github.com/repos/saltstack/salt/issues/45901","id":363871856,"user":{"login":"gtmanfred","id":732321,"avatar_url":"https://avatars0.githubusercontent.com/u/732321?v=4","gravatar_id":"","url":"https://api.github.com/users/gtmanfred","html_url":"https://github.com/gtmanfred","followers_url":"https://api.github.com/users/gtmanfred/followers","following_url":"https://api.github.com/users/gtmanfred/following{/other_user}","gists_url":"https://api.github.com/users/gtmanfred/gists{/gist_id}","starred_url":"https://api.github.com/users/gtmanfred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gtmanfred/subscriptions","organizations_url":"https://api.github.com/users/gtmanfred/orgs","repos_url":"https://api.github.com/users/gtmanfred/repos","events_url":"https://api.github.com/users/gtmanfred/events{/privacy}","received_events_url":"https://api.github.com/users/gtmanfred/received_events","type":"User","site_admin":false},"created_at":"2018-02-07T18:53:49Z","updated_at":"2018-02-07T18:53:49Z","author_association":"OWNER","body":"imports in jinja need to be full paths, they cannot be salt://paths.\r\n\r\nIf you want to use salt:// you will need to use cp.cache_file for that.\r\n\r\n```\r\n{% from salt.cp.cache_file('salt://nginx/conf/map.jinja') import nginx %}\r\n```"}}
{"actor":{"display_login":"gtmanfred"}}