Skip to content
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

sync fb_hosts with upstream #250

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion cookbooks/fb_hosts/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
license 'Apache-2.0'
description 'Installs/Configures /etc/hosts'
source_url 'https://github.com/facebook/chef-cookbooks/'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.0.1'
supports 'centos'
supports 'debian'
Expand Down
4 changes: 2 additions & 2 deletions cookbooks/fb_hosts/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

template '/etc/hosts' do
source 'hosts.erb'
owner 'root'
group 'root'
owner node.root_user
group node.root_group
mode '0644'
# workaround for https://github.com/docker/docker/issues/9295
atomic_update false
Expand Down
2 changes: 1 addition & 1 deletion cookbooks/fb_hosts/templates/default/hosts.erb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fe80::1%lo0 localhost
<%= ip6 %> <%= hosts_names %>
<% end %>
<% unless node['fb_hosts']['extra_entries'].empty? %>
<% node['fb_hosts'][ 'extra_entries'].to_hash.each do |ip, names| %>
<% node['fb_hosts']['extra_entries'].to_hash.each do |ip, names| %>
<%= ip %> <%= names.join(' ') %>
<% end %>
<% end %>