I have data in hiera that is structured to purge directories of specific files based on the path, age, and name.
I have a data structure like the following:
rules:
'/tmp':
daystokeep: 5
wildcard: '*.log'
The problem is that if I want to add another rule for /tmp, I cannot because the names would be the same like:
rules:
'/tmp':
daystokeep: 5
wildcard: '*.log'
'/tmp':
daystokeep: 2
wildcard: '*.txt'
Hiera only takes the second value. Is there a struct that I could create that would fullfill the requirements with this data structure?
thanks,
**EDIT**
Fixed with:
rules:
- path: '/tmp':
daystokeep: 5
wildcard: '*.log'
- path: '/tmp':
daystokeep: 2
wildcard: '*.txt'
I don't know how this worked ^ What data structure is that? An array with hashes?
↧