Updated config_yaml (markdown)

Chris Caron 2023-10-15 17:40:10 -04:00
parent f24e0e1c50
commit e2a3d399f6

@ -112,6 +112,81 @@ urls:
tag: chris, customer tag: chris, customer
``` ```
### Tag Grouping
New in v1.6.0 is Tag Grouping! This allows you to assign a group to previous tags defined.
```yaml
# Define your Groups
groups:
friends: user1, user2
# Define your URLs
urls:
# One-liner (no colon at the end); just the url as you'd expect it:
- mailto://credentials:
- tag: user1
- mailto://credentials:
- tag: user2
```
With respect to `Group Example #1` above, you could now send a notification to the tag `friends` and that would in turn trigger a notification to all of the URLs that were included indirectly to that tag. In this case, `user1` and `user2` would be notified.
Another great thing about groups is you can assign groups to groups to recursively include everything they're apart of:
```yaml
# Define your Groups
groups:
finance: user1, user2
devteam: user3, user4
# Here we create another group and assign it groups
# We also can mix and max tags in line with group assignments too
# like so:
company: finance, devteam, boss
# Define your URLs
urls:
# One-liner (no colon at the end); just the url as you'd expect it:
- mailto://credentials:
- tag: user1
- mailto://credentials:
- tag: user2
- mailto://credentials:
- tag: user3
- mailto://credentials:
- tag: user4
- mailto://credentials:
- tag: boss
```
With respect to `Group Example #2` above, you could now send a notification to the tag `company` and that would in turn trigger a notification to everyone because they're all associated with the group tag.
You can also assign tags to multiple groups:
```yaml
# Define your Groups
groups:
# Multiple Group Assignments; reuse of a tag causes existing assignment
# to stack on the previous value.
TeamA, Friends: user1, user3
TeamB, Friends: user2, user4
# Define your URLs
urls:
# One-liner (no colon at the end); just the url as you'd expect it:
- mailto://credentials:
- tag: user1
- mailto://credentials:
- tag: user2
- mailto://credentials:
- tag: user3
- mailto://credentials:
- tag: user4
```
With respect to `Group Example #3` above, we have 3 group tags created (TeamA, TeamB, and Friends). TeamA includes user1 and user3, and Team B contains user2 and user4. The Friends tag actually includes user1, user2, user3, and user4 (all entries stacked).
**Some Notes:**
- There is no requirement to define the group before or after the URLs that are defined.
- Tags associated with a group that are not used are just ignored.
- Reuse of the same group assignment stacks it's values (it does not replace them)
## Expanding Configuration Sources ## Expanding Configuration Sources
The YAML based configuration also supports the keyword `include` which allows you to pull more configuration down from other locations. For example: The YAML based configuration also supports the keyword `include` which allows you to pull more configuration down from other locations. For example:
```yaml ```yaml