ANSIBLE.LINEINFILE(3)           ANSIBLE MODULES          ANSIBLE.LINEINFILE(3)



NAME
       lineinfile - Ensure a particular line is in a file

DESCRIPTION
       This module will search a file for a line, and ensure that it is
       present or absent.

       This is primarily useful when you want to change a single line in a
       file only. For other cases, see the copy or template modules.

OPTIONS
       backup Create a backup file including the timestamp information so you
              can get the original file back if you somehow clobbered it
              incorrectly.

       create Used with state=present. If specified, the file will be created
              if it does not already exist. By default it will fail if the
              file is missing.  Choices: True,False.

       dest   The file to modify(required)

       insertafter
              Used with state=present. If specified, the line will be inserted
              after the specified regular expression. Two special values are
              available; BOF for inserting the line at the beginning of the
              file, and EOF for inserting the line at the end of the file.
              Choices: BOF,EOF. (default: EOF)

       line   Required for state=present. The line to insert/replace into the
              file. Must match the value given to regexp.

       regexp The regular expression to look for in the file. For
              state=present, the pattern to replace. For state=absent, the
              pattern of the line to remove.(required)

       state  Whether the line should be there or not.  Choices:
              present,absent. (default: present)."

EXAMPLES
       lineinfile: dest=/etc/selinux/config regexp=^SELINUX= line=SELINUX=disabled

       lineinfile: dest=/etc/sudoers state=absent regexp="^%wheel"

AUTHOR
       Daniel Hokka Zakrisson

SEE ALSO
       ansible(1), http://ansible.github.com/modules.html#lineinfile



0.9                               2012-11-30             ANSIBLE.LINEINFILE(3)
