Created
January 9, 2012 10:29
-
-
Save thommay/1582357 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby_block "configure #{p} module" do | |
block do | |
require 'chef/util/file_edit' | |
nc = Chef::Util::FileEdit.new("/etc/reconnoiter/noit.conf") | |
nc.insert_line_after_match(/lua.*noit.module.smtp/, "<module loader=\"lua\" name=\"#{p}\" object=\"noit.module.#{p}\"/>") | |
nc.write_file | |
Chef::Log.info "Inserted module config for #{p}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment