saltstack/salt — pull request #6508 by rca (2013-08-03 01:41:50+00:00)
Title: Added pillar:// scheme to file.managed.

It's very difficult to use the `contents` option in `file.managed` with pillar data and I came up with a quick way to get this functionality into `file.managed` by passing in a `source` with the `pillar://` scheme followed by a path usable by `pillar.get`. This works amazingly well and looks to me like a natural fit to the way `file.managed` operates. For example:

```
/etc/myservice.conf:
file.managed:
- source: pillar://services:myservice:conf
```

Please share your thoughts and if there is a better place to check for the pillar scheme. The current implementation is a bit hacked in and needs tests.

Thanks.