{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/19816","labels_url":"https://api.github.com/repos/saltstack/salt/issues/19816/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/19816/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/19816/events","html_url":"https://github.com/saltstack/salt/issues/19816","id":54675103,"number":19816,"title":"can not call custom _modules with  jinja from  pillar ","user":{"login":"wuxxin","id":3779140,"avatar_url":"https://avatars.githubusercontent.com/u/3779140?v=3","gravatar_id":"","url":"https://api.github.com/users/wuxxin","html_url":"https://github.com/wuxxin","followers_url":"https://api.github.com/users/wuxxin/followers","following_url":"https://api.github.com/users/wuxxin/following{/other_user}","gists_url":"https://api.github.com/users/wuxxin/gists{/gist_id}","starred_url":"https://api.github.com/users/wuxxin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wuxxin/subscriptions","organizations_url":"https://api.github.com/users/wuxxin/orgs","repos_url":"https://api.github.com/users/wuxxin/repos","events_url":"https://api.github.com/users/wuxxin/events{/privacy}","received_events_url":"https://api.github.com/users/wuxxin/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/Medium+Severity","name":"Medium Severity","color":"fad8c7"}],"state":"open","locked":false,"assignee":{"login":"jfindlay","id":702905,"avatar_url":"https://avatars.githubusercontent.com/u/702905?v=3","gravatar_id":"","url":"https://api.github.com/users/jfindlay","html_url":"https://github.com/jfindlay","followers_url":"https://api.github.com/users/jfindlay/followers","following_url":"https://api.github.com/users/jfindlay/following{/other_user}","gists_url":"https://api.github.com/users/jfindlay/gists{/gist_id}","starred_url":"https://api.github.com/users/jfindlay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfindlay/subscriptions","organizations_url":"https://api.github.com/users/jfindlay/orgs","repos_url":"https://api.github.com/users/jfindlay/repos","events_url":"https://api.github.com/users/jfindlay/events{/privacy}","received_events_url":"https://api.github.com/users/jfindlay/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/saltstack/salt/milestones/48","labels_url":"https://api.github.com/repos/saltstack/salt/milestones/48/labels","id":856250,"number":48,"title":"Under Review","description":"","creator":{"login":"ssgward","id":8439595,"avatar_url":"https://avatars.githubusercontent.com/u/8439595?v=3","gravatar_id":"","url":"https://api.github.com/users/ssgward","html_url":"https://github.com/ssgward","followers_url":"https://api.github.com/users/ssgward/followers","following_url":"https://api.github.com/users/ssgward/following{/other_user}","gists_url":"https://api.github.com/users/ssgward/gists{/gist_id}","starred_url":"https://api.github.com/users/ssgward/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssgward/subscriptions","organizations_url":"https://api.github.com/users/ssgward/orgs","repos_url":"https://api.github.com/users/ssgward/repos","events_url":"https://api.github.com/users/ssgward/events{/privacy}","received_events_url":"https://api.github.com/users/ssgward/received_events","type":"User","site_admin":false},"open_issues":24,"closed_issues":10,"state":"open","created_at":"2014-11-06T17:18:17Z","updated_at":"2015-01-22T18:48:59Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-01-17T21:01:47Z","updated_at":"2015-01-22T18:49:18Z","closed_at":null,"body":"* working: salt-call --local \r\n  * salt-call 2014.1.13-401-gaeda351\r\n  * salt-call 2014.7.0 (Helium)\r\n  * salt-call 2014.7.1-38-g4158b17 (Helium)\r\n* **not** working: salt-call (with master)\r\n  * same versions as tested with --local\r\n* use case:\r\n   * as a devop i want to make some ip address related calculations in pillar, to do so i include a custom python module for this calculations and want to use it from pillar\r\n* reproduction:\r\n  * paste setup_issue.sh into empty directory\r\n  * look at setup_issue.sh and if ok, chmod +x setup_issue.sh and run it (./setup_issue.sh)\r\n  * masterless check (should work)\r\n    * ./sc-local.sh saltutil.sync_all\r\n    * ./sc-local.sh pillar.item test\r\n  * check with master:\r\n    * ./sc-master.sh saltutil.sync_all\r\n    * # do this once again, because i didnt came up with a working solution for accepting the minion key on the first run\r\n    * ./sc-master.sh pillar.item test\r\n    * check output in master/\r\n      * function is not found\r\n\r\n----\r\n```\r\n#!/bin/sh\r\nprog=`readlink -f $0`\r\ndir=`dirname $prog`\r\nfor f in local local_root master master_root minion minion_root; do mkdir -p $dir/$f; done\r\nmkdir -p $dir/./salt\r\nmkdir -p $dir/./salt/_modules\r\nmkdir -p $dir/./pillar\r\nfor a in local/minion master/master minion/minion; do \r\n  stype=${a%%/*}\r\n  cat > $dir/$a <<EOF\r\nroot_dir: $dir/${stype}_root\r\npidfile: salt-${stype}.pid\r\npki_dir: pki\r\ncachedir: cache\r\nsock_dir: run\r\nlog_file: ${stype}-salt.log\r\nkey_logfile: ${stype}-key.log\r\nmaster_port: 45060\r\npublish_port: 45050\r\nret_port: 45060\r\nfileserver_backend:\r\n  - roots\r\npillar_roots:\r\n  base:\r\n    - $dir/pillar\r\nfile_roots:\r\n  base:\r\n    - $dir/salt\r\nEOF\r\ndone\r\necho \"id: pillar_test\" >> $dir/local/minion\r\necho \"file_client: local\" >> $dir/local/minion\r\necho \"id: pillar_test\" >> $dir/minion/minion\r\necho \"master: localhost\" >> $dir/minion/minion\r\ncat > $dir/sc-local.sh <<\"EOF\"\r\n#!/bin/sh\r\nprog=`readlink -f $0`\r\ndir=`dirname $prog`\r\nsudo salt-call --local --config-dir=$dir/local $@\r\nEOF\r\nchmod +x $dir/sc-local.sh\r\ncat > $dir/sc-master.sh <<\"EOF\"\r\n#!/bin/sh\r\nprog=`readlink -f $0`\r\ndir=`dirname $prog`\r\nsudo salt-master --config-dir=$dir/master -d\r\nsudo salt-minion --config-dir=$dir/minion -d\r\nsleep 3\r\nsudo salt-key --config-dir=$dir/master -A -y\r\nsudo salt-call --config-dir=$dir/minion $@\r\nsleep 1\r\nsudo kill `cat $dir/master_root/salt-master.pid`\r\nsudo kill `cat $dir/minion_root/salt-minion.pid`\r\nEOF\r\nchmod +x $dir/sc-master.sh\r\ncat > $dir/./salt/top.sls<<\"EOF\"\r\nbase:\r\n  '*':\r\n    - test_state\r\nEOF\r\ncat > $dir/./salt/_modules/extf.py<<\"EOF\"\r\n# -*- coding: utf-8 -*-\r\n\r\ndef test_equal(first, second):\r\n\r\n    if first == second:\r\n        return True\r\n    else:\r\n        return False\r\nEOF\r\ncat > $dir/./salt/test_state.sls<<\"EOF\"\r\ncurl:\r\n  pkg:\r\n    - installed\r\nEOF\r\ncat > $dir/./pillar/top.sls<<\"EOF\"\r\nbase:\r\n  '*':\r\n    - included_pillar\r\nEOF\r\ncat > $dir/./pillar/included_pillar.sls<<\"EOF\"\r\ntest:\r\n  data: {{ salt['extf.test_equal']('1','1') }}\r\nEOF\r\n```"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/71075356","html_url":"https://github.com/saltstack/salt/issues/19816#issuecomment-71075356","issue_url":"https://api.github.com/repos/saltstack/salt/issues/19816","id":71075356,"user":{"login":"jfindlay","id":702905,"avatar_url":"https://avatars.githubusercontent.com/u/702905?v=3","gravatar_id":"","url":"https://api.github.com/users/jfindlay","html_url":"https://github.com/jfindlay","followers_url":"https://api.github.com/users/jfindlay/followers","following_url":"https://api.github.com/users/jfindlay/following{/other_user}","gists_url":"https://api.github.com/users/jfindlay/gists{/gist_id}","starred_url":"https://api.github.com/users/jfindlay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfindlay/subscriptions","organizations_url":"https://api.github.com/users/jfindlay/orgs","repos_url":"https://api.github.com/users/jfindlay/repos","events_url":"https://api.github.com/users/jfindlay/events{/privacy}","received_events_url":"https://api.github.com/users/jfindlay/received_events","type":"User","site_admin":false},"created_at":"2015-01-22T18:49:18Z","updated_at":"2015-01-22T18:49:18Z","body":"Thank you all for your feedback."}}