blob: 156f2559de876047ad26f5046045a8ed3895ff75 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
Puppet::Type.type(:whole_line).provide(:ruby) do
def exists?
File.readlines(resource[:path]).find do |line|
line.chomp == resource[:line].chomp
end
end
def create
File.open(resource[:path], 'a') do |fh|
fh.puts resource[:line]
end
end
end
|