Fair enough, I was sort of sleep deprived and just wanted something that actually worked as quickly as possible haha.
I'd also prefer those be replaced with a template. IMO, reading a config file with placeholders is much easier than concatenating it in my mind as a series of _lineinfile_ commands.