Using module vs copying conf file

I’m using the sysctl module to add a bunch of parameters to the /etc/sysctl.conf but should I just keep a local copy of my updated sysctl.conf file and upload it?

It does take longer to run one sysctl command at a time with ansible vs copying the file. How do you guys do it? I guess using the module is better for 2-3 parameters but where’s the line?

It's a matter of taste at the end of the day - lineinfile type things
give me a bad feeling in general,
but then again I can't always guarantee the entire state of a file is
something I can always track.

My rule of thumb is to use a template when:

- the file is largely consistent across boxes
- minor variations like specific ntp services can be accommodated with
variables
- a specific handler for restarts can be neatly applied

for sysctl its a bit more complicated than this. If you have just a few
machines you could probably keep it in a single template, but if there
are many variations eventually it will become too slow as you noted.

A+
Dave