Skip to content

Instantly share code, notes, and snippets.

@leifmadsen
Created August 1, 2012 21:30
Show Gist options
  • Save leifmadsen/3230934 to your computer and use it in GitHub Desktop.
Save leifmadsen/3230934 to your computer and use it in GitHub Desktop.
Chef template using Discovery library
# Configure vsftpd
template "/etc/vsftpd.conf" do
source "vsftpd-conf.erb"
mode 00644
owner "root"
group "root"
variables({
:public_ipv4 => Discovery.ipaddress(:remote_node => node, :node => node, :type => :public)
})
notifies :reload, "service[vsftpd]"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment