# Sitecore 9 rule-based configuration and numbered roles


<!--kg-card-begin: markdown-->
The other day I was digging around and stumbled upon an undocumented feature for the (somewhat) new [rule-based configuration](https://doc.sitecore.net/sitecore_experience_platform/developing/developing_with_sitecore/customizing_server_configuration/rulebased_configuration) released with Sitecore 9.
 
You can append `-{number}` to the role definition (in `<appSettings>` in `Web.config`) and it will work as both the full role name and without the `-{number}` part, e.g. `ContentManagement-1` works as both `ContentManagement` and `ContentManagement-1`.
 
Web.config:

```xml
<cofiguration>
    <appSettings>
        <!-- The standard way -->
        <setting name="role:define" value="ContentManagement" />
        
        <!-- Numbered version -->
        <setting name="role:define" value="ContentManagement-1" />
    </appSettings>
</configuration>
```
 
Any Sitecore config patch file:

```xml
<configuration>
   <sitecore>
       <settings>
           <!-- Both approaches below will work with 'ContentManagement-1' role -->
           <setting name="my.setting" value="1234" role:require="Content-Management" />
           <setting name="my.setting" value="1234" role:require="Content-Management-1" />
       </settings>
    </sitecore>
</configuration>
```
 
It's nothing too special and nothing you couldn't do before, but it's a bit simpler to configure if you have multiple servers with the same role, where one specific server needs specific settings - e.g. if only the primary CM server should have some feature enabled.
 <!--kg-card-end: markdown-->
