-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
facts_hash_hiera_merge removed in 4.0.0? #72
Comments
You can use following to merge
|
That lookup_options config did not work with 4.0.0 it still overwrites manual changes i done in my facter file. To not have it overwrite my facter file i had to add what you suggested and this to all my yaml profiles files
|
We set following in
Could you maybe paste general parts of your yaml configuration? Maybe the lookup_options for the facter are not loaded in hiera? And could you paste the
You don't need to match any thing. The class is |
my
my
This is my
The value |
And in what file do you set the
|
I put that as a workaround in |
I am no puppet proffesional, but if I get together these important parts:
Then I see the problem, that it should set the fact in the As flow described: The puppet starts processing hiera.yaml. The This behaviour is probably because of improving facts file content. There was a code in v3.5.0 in file
but this code keep non-existing facts, only add new one. But then would be kept facts in the file, which have not defined. Then there was a change 4786443 to generate the whole file new only with defined facts. In fact, your hiera has no logic. You want to load some yaml file of the profile, which you define in the specific profile. Correctly, you should define fact We define fact
Yes, because fact I hope this will help you. |
domain is part of facters core fact so it determines that based on the fqdn of the server. https://www.puppet.com/docs/puppet/8/core_facts.html#networking Sure i could load the role from a static puppet file but dont really want to. We will probably look at some ENC in the future. When i was using facter v3.5.0 i could manually edit my
If i then run puppet agent it would load that profile on to the server.
And next puppet run it will remove the profile from my
So really what i am asking is why my facter::facts_hash is not merging with local changes not defined anywhere in my puppet code. |
Exactly
Please, don't take it offensive, but IMHO your WoW is incorrect. You shouldn't do anything manually on the server. You should configure everything in puppet. What is for you the difference to edit plain text file
Yes, you could. And IMHO this behaviour was incorrect (bug). If you had some fact already in the file, then there was no possibility to delete it from the file. In this case, either you had to delete it manually from the file or there was a risk, that the server will be configured incorrectly because of defined incorrect fact. Now, it works correctly. The Imagine you have to reinstall 50 servers. After basic installation you have to go to all these 50 servers, find out, which profile do they use, edit some file and then run puppet to make correct installation. If you have everything in puppet, then you run a few times puppet after base host installation and you have the same configuration as before. We use puppet different way than you. We rebuild server using Consider to change your WoW and configuration to define profile in host's file to load profile/PROFILE.yaml configration. |
Okey i see it was a bug. Yes i know our WoW is incorrect, it was done that way because of legacy reasons. |
Below hiera config in 4.0.0 does not exist and had to revert to 3.5.0 to not overwrite my facter file.
facter::facts_hash_hiera_merge: true
Any reason why?
The text was updated successfully, but these errors were encountered: