-
Notifications
You must be signed in to change notification settings - Fork 8
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
Do not add entry if it's primary_name #23
Comments
Hi, Perhaps you could try using hosts::entries? Or using one_primary_ipv4 or Regarding the template. Yes it's horrible, I have planned to rewrite it using |
I'm trying to understand what you need, my best guess is that you have added I have some suggestions you could try
This will prevent all content under the first heading, but add all
It will only be excluded under the heading "# Primary address" and not "# Additional entries" I have now mostly finished the rewriting (merged to master branch which will be I have also added lots of testcases, including one for suggestion 1, with let(:params) do
{
enable_ipv4: false,
enable_ipv6: false,
entries: {
'10.10.10.1' => [
'foo.example.org'
],
'127.0.0.1' => [
'localhost'
],
'::1' => [
'localhost'
]
}
}
end Which results in
|
Hello,
Shouldn't pass an entry if the hostname is the same as primary_name ?
As an example, we're using this module on a cluster. Each machine use a public network and a private one. We want all traffic to go through the private network so all nodes has been added as entries.
We end up with a hosts file like this on node01 :
1.2.3.1 node01.domain.com node01
dead::beef node01.domain.com node01
10.10.10.1 node01.domain.com node01
10.10.10.2 node02.domain.com node02
and so on ...
This create a duplicate entry for the local node. AFAIK the first one is used by this could potentially create strange behavior right ?
A good practice would be to filter entries corresponding to primary_name.
Sorry, I tried to create the code in the template file but it far above my skills.
Thanks !
The text was updated successfully, but these errors were encountered: