Commit 31a4fe41 by Michael DeHaan

Complain when modules do not have documentation.

parent a2f76c1c
.TH ANSIBLE.LINEINFILE 5 "2012-09-26" "unknown" "ANSIBLE MODULES" .TH ANSIBLE.LINEINFILE 5 "2012-09-30" "0.8" "ANSIBLE MODULES"
." generated from library/lineinfile ." generated from library/lineinfile
.SH NAME .SH NAME
lineinfile \- Ensure a particular line is in a file lineinfile \- Ensure a particular line is in a file
...@@ -8,35 +8,27 @@ lineinfile \- Ensure a particular line is in a file ...@@ -8,35 +8,27 @@ lineinfile \- Ensure a particular line is in a file
This module will search a file for a line, and ensure that it is present or absent. This module will search a file for a line, and ensure that it is present or absent.
.PP .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. 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 ." ------ OPTIONS
." ."
." ."
.SH OPTIONS .SH OPTIONS
.IP name
The file to modify
(required)
.IP regexp
The regular expression to look for in the file. For \fIstate=present\fR, the pattern to replace. For \fIstate=absent\fR, the pattern of the line to remove.
(required)
.IP state .IP state
Whether the line should be there or not. Whether the line should be there or not.
." .SS Choices
.IR Choices : .IR Choices :
present,absent. present,absent. (default: present)
.IP line .IP name
Required for \fIstate=present\fR. The line to insert/replace into the file. Must match the value given to \fCregexp\fR. The file to modify(required)
.IP insertafter .IP insertafter
Used with \fIstate=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. Used with \fIstate=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.
." .SS Choices
.IR Choices : .IR Choices :
BOF,EOF. BOF,EOF. (default: EOF)
.IP regexp
The regular expression to look for in the file. For \fIstate=present\fR, the pattern to replace. For \fIstate=absent\fR, the pattern of the line to remove.(required)
.IP line
Required for \fIstate=present\fR. The line to insert/replace into the file. Must match the value given to \fCregexp\fR.
.IP backup .IP backup
Create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly. Create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly.."
."
." ."
." ------ NOTES ." ------ NOTES
." ."
......
...@@ -30,6 +30,11 @@ import time ...@@ -30,6 +30,11 @@ import time
import datetime import datetime
import subprocess import subprocess
# modules that are ok that they do not have documentation strings
BLACKLIST_MODULES = [
'async_wrapper'
]
MODULEDIR="/Users/jpm/Auto/pubgit/ansible/ansible/library" MODULEDIR="/Users/jpm/Auto/pubgit/ansible/ansible/library"
BOILERPLATE = ''' BOILERPLATE = '''
...@@ -282,6 +287,11 @@ def main(): ...@@ -282,6 +287,11 @@ def main():
print " processing module source ---> %s" % fname print " processing module source ---> %s" % fname
doc = get_docstring(fname, verbose=args.verbose) doc = get_docstring(fname, verbose=args.verbose)
if doc is None and module not in BLACKLIST_MODULES:
sys.stderr.write("*** ERROR: CORE MODULE MISSING DOCUMENTATION: %s ***\n" % module)
#sys.exit(1)
if not doc is None: if not doc is None:
doc['filename'] = fname doc['filename'] = fname
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment