mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-30 16:41:21 -07:00
Library functions and modules should be in the 3 man page section. Also the files should end in '.3'
This commit is contained in:
parent
53d24ef002
commit
85fb7c6d4b
45 changed files with 10 additions and 8 deletions
51
docs/man/man3/ansible.lineinfile.3
Normal file
51
docs/man/man3/ansible.lineinfile.3
Normal file
|
@ -0,0 +1,51 @@
|
|||
.TH ANSIBLE.LINEINFILE 5 "2012-10-02" "0.8" "ANSIBLE MODULES"
|
||||
." generated from library/lineinfile
|
||||
.SH NAME
|
||||
lineinfile \- Ensure a particular line is in a file
|
||||
." ------ DESCRIPTION
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
This module will search a file for a line, and ensure that it is present or absent.
|
||||
.PP
|
||||
This is primarily useful when you want to change a single line in a file only. For other cases, see the \fIcopy\fR or \fItemplate\fR modules.
|
||||
." ------ OPTIONS
|
||||
."
|
||||
."
|
||||
.SH OPTIONS
|
||||
|
||||
.IP state
|
||||
Whether the line should be there or not.
|
||||
.IR Choices :
|
||||
present,absent. (default: present)
|
||||
.IP name
|
||||
The file to modify(required)
|
||||
.IP insertafter
|
||||
Used with \fCstate=present\fR. If specified, the line will be inserted after the specified regular expression. Two special values are available; \fCBOF\fR for inserting the line at the beginning of the file, and \fCEOF\fR for inserting the line at the end of the file.
|
||||
.IR Choices :
|
||||
BOF,EOF. (default: EOF)
|
||||
.IP regexp
|
||||
The regular expression to look for in the file. For \fCstate=present\fR, the pattern to replace. For \fCstate=absent\fR, the pattern of the line to remove.(required)
|
||||
.IP line
|
||||
Required for \fCstate=present\fR. The line to insert/replace into the file. Must match the value given to \fCregexp\fR.
|
||||
.IP backup
|
||||
Create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly.."
|
||||
."
|
||||
." ------ NOTES
|
||||
."
|
||||
."
|
||||
." ------ EXAMPLES
|
||||
.SH EXAMPLES
|
||||
.PP
|
||||
.nf
|
||||
lineinfile name=/etc/selinux/config regexp=^SELINUX= line=SELINUX=disabled
|
||||
.fi
|
||||
.PP
|
||||
.nf
|
||||
lineinfile name=/etc/sudoers state=absent regexp="^%wheel"
|
||||
.fi
|
||||
." ------- AUTHOR
|
||||
.SH AUTHOR
|
||||
Daniel Hokka Zakrisson
|
||||
.SH SEE ALSO
|
||||
.IR ansible (1),
|
||||
.I http://ansible.github.com/modules.html#lineinfile
|
Loading…
Add table
Add a link
Reference in a new issue