class EtcHosts
Public Instance Methods
deploy()
click to toggle source
# File lib/dust/recipes/etc_hosts.rb, line 3 def deploy @node.deploy_file "#{@template_path}/hosts", '/etc/hosts', :binding => binding # restart dns service if @options.restart? and @config.is_a? String @node.install_package @config @node.restart_service @config end end
status()
click to toggle source
# File lib/dust/recipes/etc_hosts.rb, line 14 def status msg = @node.messages.add('getting /etc/hosts') ret = @node.exec 'cat /etc/hosts' msg.parse_result(ret[:exit_code]) msg.print_output(ret) end