Closed kobybr closed 5 years ago
Yes, I can add some unit tests.
Basically, I have two yaml files. One managed locally and one acquired via hiera-http backend. Hashes are merged via hiera lookup function.
The end result I am looking for is that user1 is created and added to groups group1 and group2. With the existing code, user1 is only added to group2 to due to the merge functions right order precedence
hiera1.yaml
profile::core::groups:
group1:
gid: 30000
profile::core::users:
user1:
groups:
- group1
hiera2.yaml
profile::core::groups:
group2:
gid: 30001
profile::core::users:
user1:
comments: User 1
user2:
comments: User 2
profile::core::usergroups:
groupsofusers:
- user1
- user2
profile::core::accounts:
'@groupsofusers':
groups:
- group2
Unit test added.
OK I get the idea. Could you separate the system
parameter in a different PR and add some doc maybe?
Thanks. @mcanevet care to give me a second opinion?
Any word on this?
Could you provide an example of what you're trying to achieve here, or ideally a collection of unit tests this PR allows to pass?