{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/22770","labels_url":"https://api.github.com/repos/saltstack/salt/issues/22770/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/22770/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/22770/events","html_url":"https://github.com/saltstack/salt/issues/22770","id":69069153,"number":22770,"title":"Calling salt.show_top in pillar does not work","user":{"login":"cetra3","id":6415435,"avatar_url":"https://avatars.githubusercontent.com/u/6415435?v=3","gravatar_id":"","url":"https://api.github.com/users/cetra3","html_url":"https://github.com/cetra3","followers_url":"https://api.github.com/users/cetra3/followers","following_url":"https://api.github.com/users/cetra3/following{/other_user}","gists_url":"https://api.github.com/users/cetra3/gists{/gist_id}","starred_url":"https://api.github.com/users/cetra3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cetra3/subscriptions","organizations_url":"https://api.github.com/users/cetra3/orgs","repos_url":"https://api.github.com/users/cetra3/repos","events_url":"https://api.github.com/users/cetra3/events{/privacy}","received_events_url":"https://api.github.com/users/cetra3/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":"006b75"},{"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/P4","name":"P4","color":"031a39"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Pending%20Discussion","name":"Pending Discussion","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"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":2147,"closed_issues":1830,"state":"open","created_at":"2011-05-14T04:00:56Z","updated_at":"2015-04-18T00:19:22Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2015-04-17T05:58:46Z","updated_at":"2015-04-18T08:34:51Z","closed_at":null,"body":"I'm trying to check whether a formula is running and use that to effect a template.  Basically I want to have the output of `state.show_top` available either in grains or in pillar.\r\n\r\nHere's the example pillar snippet I'm using:\r\n```\r\nhighstate:\r\n  - {{ salt['state.show_top']() }}\r\n```\r\n\r\nThis manages to completely freeze the salt master when running `pillar.items` and I have to restart both minion and master.\r\n\r\nLet me know if there is a better way to do this, but I'm trying to use the top file to control what behaviour certain formulas have.  I.e, backup. \r\n\r\nI want to be able to say \"well if postgres is installed, then make sure it's backed up\", almost like an optional dependency.\r\n\r\nSo I figure if we just check the highstate file to see whether it's meant to be running, then we can use that information to build the backup script."},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/94144363","html_url":"https://github.com/saltstack/salt/issues/22770#issuecomment-94144363","issue_url":"https://api.github.com/repos/saltstack/salt/issues/22770","id":94144363,"user":{"login":"cetra3","id":6415435,"avatar_url":"https://avatars.githubusercontent.com/u/6415435?v=3","gravatar_id":"","url":"https://api.github.com/users/cetra3","html_url":"https://github.com/cetra3","followers_url":"https://api.github.com/users/cetra3/followers","following_url":"https://api.github.com/users/cetra3/following{/other_user}","gists_url":"https://api.github.com/users/cetra3/gists{/gist_id}","starred_url":"https://api.github.com/users/cetra3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cetra3/subscriptions","organizations_url":"https://api.github.com/users/cetra3/orgs","repos_url":"https://api.github.com/users/cetra3/repos","events_url":"https://api.github.com/users/cetra3/events{/privacy}","received_events_url":"https://api.github.com/users/cetra3/received_events","type":"User","site_admin":false},"created_at":"2015-04-18T08:34:51Z","updated_at":"2015-04-18T08:34:51Z","body":"Yeah, it is an interesting use case, there may be a better way to go about this, but this is the most direct way using what's already available."}}