hashbangcode / vlad

Vlad - Vagrant LAMP Ansible Drupal
173 stars 53 forks source link

How do we feel about blockinfile? #204

Open dixhuit opened 9 years ago

dixhuit commented 9 years ago

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 by lineinfile but often end up being achieved using template (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?

philipnorton42 commented 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).

dixhuit commented 9 years ago

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).

philipnorton42 commented 9 years ago

Cool. I've slotted it for 1.2 :)

dixhuit commented 9 years ago

NP. Will hold fire for now.

philipnorton42 commented 9 years ago

Well, feel free to branch it if you want :) I'm just keen on getting 1.1 out the door this week :P

dixhuit commented 9 years ago

I'm just keen on getting 1.1 out the door this week :P

Yep. That would be cool.