Announcing: lineinfile module

Folks,

I have written my lineinfile module which allows you to administer individual lines within files, using the same semantics that ansible currently uses to administer individual files within the filesystem.

You can get the file from https://github.com/azemon/ansible ; either grab file library/lineinfile from the lineinfile branch or download the lineinfile-v1.0 tag.

Here is the documentation from the top of the file:

lineinfile module - assures that a line exists in a file

Hi!

Nice module, really handy for config files where templates are not really an option. However, I had to edit line 172, and use (k, v) = x.split(“=”, 1), because if the “value” contained equal signs (as SSH public keys usually do) it died rather annoyingly.

Thanks,
Pas

Thanks, Pas. I will update my copy of the module and push it to github later today.

– Art Z.

Hey Art, I'd like to have your module in the new ansible-contrib repo.
Are you willing?

Michael's proposing contriibuted modules have a subdirectory each.
That approach would have me asking you to make a separate github
project with this structure

lineinfile_artzemon/

-README.md - description, usage, prerequisites, contact info

`-lineinfile - the module

That would let me the contribs repo follow your changes, but it it
sounds like too much work, let's talk about another route. I'm open to
ideas.

Thanks again for writing it!
--Brad

Brad,

I am very willing but it will be awhile until I can get the github repo set up. Very busy right now.

– Art Z.

Thanks for reminding me to push the patched version to github.

– Art Z.