Open dixhuit opened 9 years ago
Agreed, lineinfile is a pain and tends to get a little messy when doing multi line stuff. blockinfile look nice and I don't see any initial problems with adding in custom modules (as long as they work :P).
as long as they work :P
Absolutely.
OK, I'll look at getting this integrated then and refactor a little code to demonstrate its usage (I'll keep it minor for now in case we decide to back out).
Cool. I've slotted it for 1.2 :)
NP. Will hold fire for now.
Well, feel free to branch it if you want :) I'm just keen on getting 1.1 out the door this week :P
I'm just keen on getting 1.1 out the door this week :P
Yep. That would be cool.
So I recently gave the blockinfile module a whirl on another project and it was a decent enough fit for my needs. Multi-line
lineinfile
tasks are a PITA and in my opinion that's often a barrier to tasks that should probably be handled bylineinfile
but often end up being achieved usingtemplate
(or worse) for simplicity.If Vlad was to adopt it, we'd need to include it at
vlad/library/ansible-role-blockinfile
. Possibly as a git submodule for better flexibility. Thoughts?