I have this exec that is run ~11,000 times that is...
# puppet
g
I have this exec that is run ~11,000 times that is part of an sftp chroot setup...
Copy code
exec { "add virutal user ${hostname} to foo passwd":
    unless  => "/usr/bin/grep \"^${hostname}:\" ${passwd_file}",
    command => "/usr/bin/echo \"${hostname}::${uid}:${gid}::${host_chroot_dir}:/sbin/nologin\" >> ${passwd_file}",
    require => File[$passwd_file],
    notify  => Service['proftpd'],
  }
Would a
file_line
or
concat::fragment
(or something else you all know of) be more efficient?