-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Hostname and FQDN should be done in one line #2334
Conversation
related issues #2309 |
+1 on this, tested the patch and it fixes up the issue. |
…t break local name resolution for things like puppet
We have the same issue so I looked at it a bit. In short: comm.sudo("sed -ri 's@^((\\b[0-9]{1,3}\.){3}[0-9]{1,3})\\b.*(localhost).*$@\\1\\t#{name} #{name.split('.')[0]} \\3@g' /etc/hosts")
comm.sudo("sed -ri 's@^((\\b[0-9]{1,3}\.){3}[0-9]{1,3})\\b.*(precise64).*$@\\1\\t#{name} #{name.split('.')[0]}@g' /etc/hosts") could be comm.sudo("sed -ri 's@^(([0-9]{1,3}\.){3}[0-9]{1,3})\\s+(localhost)\\b.*$@\\1\\t#{name} #{name.split('.')[0]} \\3@g' /etc/hosts")
comm.sudo("sed -ri 's@^(([0-9]{1,3}\.){3}[0-9]{1,3})\\s+(precise64)\\b.*$@\\1\\t#{name} #{name.split('.')[0]}@g' /etc/hosts") See elliotsegler#1 |
Update boundary usage in the sed regexp to update the hosts file
Yep, agreed. |
So... |
Thanks so much :) Merging |
guests/ubuntu: Hostname and FQDN should be done in one line
Err.. Any chances to release it? |
# Second to set hostname | ||
comm.sudo("sed -i 's@#{old.split('.')[0]}@#{name.split('.')[0]}@' /etc/hosts") | ||
comm.sudo("sed -ri 's@^(([0-9]{1,3}\.){3}[0-9]{1,3})\\s+(localhost)\\b.*$@\\1\\t#{name} #{name.split('.')[0]} \\3@g' /etc/hosts") | ||
comm.sudo("sed -ri 's@^(([0-9]{1,3}\.){3}[0-9]{1,3})\\s+(precise64)\\b.*$@\\1\\t#{name} #{name.split('.')[0]}@g' /etc/hosts") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't precice64
here be #{old}
or something?
Also the corresponding Debian cap is broken. |
Same fix as hashicorp#2334.
+1 for a release, I think we can state that release 1.3.4 is hardly broken. |
@regilero 1.3.5 came out today. |
Any updates on this as we are also running into a similar problem? |
I believe this should fix issue #2333
Edit: I've updated the request with elliotsegler@06aaa6e. It's a better fix.