saltstack/salt — Issue #760: Handle SLS conflicts better
Author: hathawsh
Created: 2012-02-25 18:42:31+00:00
State: open

Salt needs to emit a warning when a chunk in SLS files overrides another.

In my case, I specified in one SLS that a package should be installed:

```
nagios-nrpe-server:
pkg:
- installed
```

In another SLS, I specified again that the same package should be installed, but also that the service should be running and should be restarted when a config file changes:

```
nagios-nrpe-server:
pkg:
- installed
service:
- running
- sig: /usr/sbin/nrpe
- watch:
- file: /etc/nagios/nrpe_local.cfg
- require:
- pkg: nagios-nrpe-server
```

For a long time, I did not notice that I had created two diverging chunks. Salt chose the definition from the first SLS file (probably due to ordering), leading to confusion. It would have helped me a lot if Salt issued a warning when a chunk overrides another.