saz/puppet-limits

Missing newline

loood opened this issue · 2 comments

loood commented

content => "# Managed by Puppet\n\n#<domain> <type> <item> <value>",

Entries are being commented out because of a lack of a newlines at the end of this quoted string. Below is the output from a puppet run reverting from master to using the 3.1.0 tag version of the module.

Notice: /Stage[main]/Limits/Limits::Limits[*/memlock]/File[/etc/security/limits.d/default_memlock.conf]/content:
--- /etc/security/limits.d/default_memlock.conf 2023-05-08 23:44:12.723211200 +0000
+++ /tmp/puppet-file20230509-11957-1hk70hn      2023-05-09 00:11:42.690896528 +0000
@@ -1,3 +1,4 @@
 # Managed by Puppet

-#<domain>    <type> <item>          <value>*             -     memlock         unlimited
+#<domain>    <type> <item>          <value>
+*             -     memlock         unlimited

Notice: /Stage[main]/Limits/Limits::Limits[*/memlock]/File[/etc/security/limits.d/default_memlock.conf]/content: current_value '{sha256}c020afae2a6b34c826d69cb9d74a61e96d2fabce0a686736ee1878392d87914e', should be '{sha256}655c84468689ddb035d916aad6c56a68c41197a3b9911ef13507299a26dd0127' (noop)

hey @loood can you check using branch from #49?

loood commented
$ git diff production
diff --git a/Puppetfile b/Puppetfile
index c117d27..f2af5a0 100644
--- a/Puppetfile
+++ b/Puppetfile
@@ -36,7 +36,11 @@ mod 'puppetlabs/apt', '9.0.1'
 mod 'puppetlabs/concat', '7.2.0'
 mod 'puppetlabs/inifile', '5.3.0'
 mod 'puppetlabs/stdlib', '8.2.0'
-mod 'saz-limits', '3.1.0'
+#mod 'saz-limits', '3.1.0'
+mod 'saz-limits',
+  :git    => 'https://github.com/bond-os/puppet-limits.git',
+  :branch => 'top_new_line'
+
 mod 'saz-sudo', '7.0.2'
 mod 'theforeman-tftp', '8.0.0'
 mod 'thias-sysctl', '1.0.7'

Ran puppet with this and everything seems good as in no files were changes compared to tag 3.1.0.