{"action":"opened","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/26799","labels_url":"https://api.github.com/repos/saltstack/salt/issues/26799/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/26799/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/26799/events","html_url":"https://github.com/saltstack/salt/issues/26799","id":104131050,"number":26799,"title":"Support custom winrepo directories, primarily for integration with salt formulas","user":{"login":"lorengordon","id":8457307,"avatar_url":"https://avatars.githubusercontent.com/u/8457307?v=3","gravatar_id":"","url":"https://api.github.com/users/lorengordon","html_url":"https://github.com/lorengordon","followers_url":"https://api.github.com/users/lorengordon/followers","following_url":"https://api.github.com/users/lorengordon/following{/other_user}","gists_url":"https://api.github.com/users/lorengordon/gists{/gist_id}","starred_url":"https://api.github.com/users/lorengordon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorengordon/subscriptions","organizations_url":"https://api.github.com/users/lorengordon/orgs","repos_url":"https://api.github.com/users/lorengordon/repos","events_url":"https://api.github.com/users/lorengordon/events{/privacy}","received_events_url":"https://api.github.com/users/lorengordon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-31T20:45:02Z","updated_at":"2015-08-31T20:45:02Z","closed_at":null,"body":"I'm really excited about the support in v2015.8 for jinja rendering of winrepo sls files. One thing that might be nice to add from here would be a way to distribute the winrepo sls definition with a salt formula. Right now, it's really two separate steps. I often write a winrepo pkg definition, then write a formula to manage the installation and configuration of the package.\r\n\r\nThe issue is that the location of winrepo pkg definitions is controlled by the configuration parameter, `win_repo`, but the location of the formulas is controlled by the configuration parameter, `file_roots`. That means that as a user if I want to use a formula that depends on a winrepo pkg, I need to grab the winrepo pkg definition and place it in the right spot, and also grab the formula and place it in the right spot. \r\n\r\nThis gets a bit more difficult to manage if the winrepo pkg is using the new support for pillar, which I desperately want to use to specify the `source` for winrepo pkgs (for minions that do not have access to the Internet). Because the winrepo pkg and the formula are managed separately, the pillar documentation ends up in two places, one place for the winrepo pkg, and one for the formula.\r\n\r\nWhat I think would help, would be a way to include the winrepo definition within the formula repo. My proposed way ahead would be to support custom winrepo directories the same way as custom modules, states, and most everything else. In other words, a directory named `_winrepo` in the formula  directory (or really, in `file_roots`) would be treated as a custom windows package repository, and the pkg definition would be available automatically. The pkg could then be referred to immediately by the states in the formula, without further configuration by the user external to the formula. And preferably without needing to invoke `winrepo.genrepo`...\r\n\r\nThoughts?"}}