I am using the line cookbook and i want to add these 2 lines:
-
soft nofile 2048
-
hard nofile 3072
between 2 lines in /etc/security/limits.conf so i am using:
add_to_list “add entry to a list” do
path “/etc/security/limits.conf"
pattern “#@student - maxlogins 4"
delim [”
”]
entry "* soft nofile 2048
-
hard nofile 3072"
end
but every time it runs its duplicating the lines, how can i make sure it adds it only once?
Thanks in advance.