Various tweaking to get the module formatter to work for 'make docs' in the docs project. Likely the templates for other module formatting types will have to change
by the time I'm done.
This commit is contained in:
parent
ff9708fd65
commit
5256ea7e75
4 changed files with 113 additions and 114 deletions
30
file
30
file
|
@ -38,21 +38,21 @@ description:
|
||||||
the file module - including M(copy), M(template), and M(assmeble).
|
the file module - including M(copy), M(template), and M(assmeble).
|
||||||
version_added: "0.1"
|
version_added: "0.1"
|
||||||
options:
|
options:
|
||||||
- dest:
|
dest:
|
||||||
description:
|
description:
|
||||||
- defines the file being managed, unless when used with I(state=link), and then sets the destination to create a symbolic link to using I(src)
|
- defines the file being managed, unless when used with I(state=link), and then sets the destination to create a symbolic link to using I(src)
|
||||||
required: true
|
required: true
|
||||||
default: []
|
default: []
|
||||||
aliases: []
|
aliases: []
|
||||||
- state:
|
state:
|
||||||
description:
|
description:
|
||||||
- If directory, all immediate subdirectories will be created if they do not exist. If I(file), the file will NOT be created if it does not exist, see the M(copy) or M(template) module if you want that behavior. If I(link), the symbolic link will be created or changed. If absent, directories will be recursively deleted, and files or symlinks will be unlinked.
|
- If directory, all immediate subdirectories will be created if they do not exist. If I(file), the file will NOT be created if it does not exist, see the M(copy) or M(template) module if you want that behavior. If I(link), the symbolic link will be created or changed. If absent, directories will be recursively deleted, and files or symlinks will be unlinked.
|
||||||
required: false
|
required: false
|
||||||
default: file
|
default: file
|
||||||
choices: [ file, link, directory, absent ]
|
choices: [ file, link, directory, absent ]
|
||||||
- mode:
|
mode:
|
||||||
description:
|
description:
|
||||||
- mode the file or directory should be, such as 0644 as would be fed to I(chmod). English modes like B(g+x) are not yet supported
|
- mode the file or directory should be, such as 0644 as would be fed to I(chmod). English modes like B(g+x) are not yet supported
|
||||||
examples:
|
examples:
|
||||||
- code: file path=/etc/foo.conf owner=foo group=foo mode=0644
|
- code: file path=/etc/foo.conf owner=foo group=foo mode=0644
|
||||||
description: Example from Ansible Playbooks
|
description: Example from Ansible Playbooks
|
||||||
|
|
52
get_url
52
get_url
|
@ -33,32 +33,32 @@ description:
|
||||||
server must have direct access to the remote resource.
|
server must have direct access to the remote resource.
|
||||||
version_added: "0.6"
|
version_added: "0.6"
|
||||||
options:
|
options:
|
||||||
- url:
|
url:
|
||||||
description:
|
description:
|
||||||
- HTTP, HTTPS, or FTP URL
|
- HTTP, HTTPS, or FTP URL
|
||||||
required: true
|
required: true
|
||||||
default: null
|
default: null
|
||||||
aliases: []
|
aliases: []
|
||||||
- dest:
|
dest:
|
||||||
description:
|
description:
|
||||||
- absolute path of where to download the file to.
|
- absolute path of where to download the file to.
|
||||||
- If I(dest) is a directory, the basename of the file on the remote server will be used. If a directory, I(thirsty=yes) must also be set.
|
- If I(dest) is a directory, the basename of the file on the remote server will be used. If a directory, I(thirsty=yes) must also be set.
|
||||||
required: true
|
required: true
|
||||||
default: null
|
default: null
|
||||||
- thirsty:
|
thirsty:
|
||||||
description:
|
description:
|
||||||
- if C(yes), will download the file every time and replace the
|
- if C(yes), will download the file every time and replace the
|
||||||
file if the contents change. if C(no), the file will only be downloaded if
|
file if the contents change. if C(no), the file will only be downloaded if
|
||||||
the destination does not exist. Generally should be C(yes) only for small
|
the destination does not exist. Generally should be C(yes) only for small
|
||||||
local files. prior to 0.6, acts if C(yes) by default.
|
local files. prior to 0.6, acts if C(yes) by default.
|
||||||
version_added: "0.7"
|
version_added: "0.7"
|
||||||
required: false
|
required: false
|
||||||
choices: [ "yes", "no" ]
|
choices: [ "yes", "no" ]
|
||||||
default: "no"
|
default: "no"
|
||||||
- others:
|
others:
|
||||||
description:
|
description:
|
||||||
- all arguments accepted by the M(file) module also work here
|
- all arguments accepted by the M(file) module also work here
|
||||||
required: false
|
required: false
|
||||||
examples:
|
examples:
|
||||||
- code: get_url url=http://example.com/path/file.conf dest=/etc/foo.conf mode=0440
|
- code: get_url url=http://example.com/path/file.conf dest=/etc/foo.conf mode=0440
|
||||||
description: Obtain and install config file
|
description: Obtain and install config file
|
||||||
|
|
69
ini_file
69
ini_file
|
@ -29,41 +29,40 @@ description:
|
||||||
sections if they don't exist.
|
sections if they don't exist.
|
||||||
version_added: "0.9"
|
version_added: "0.9"
|
||||||
options:
|
options:
|
||||||
- dest:
|
dest:
|
||||||
description:
|
description:
|
||||||
- Path to the INI-style file; this file is created if required
|
- Path to the INI-style file; this file is created if required
|
||||||
required: true
|
required: true
|
||||||
default: null
|
default: null
|
||||||
aliases: []
|
aliases: []
|
||||||
- section:
|
section:
|
||||||
description:
|
description:
|
||||||
- Section name in INI file. This is added if C(state=present) automatically when
|
- Section name in INI file. This is added if C(state=present) automatically when
|
||||||
a single value is being set.
|
a single value is being set.
|
||||||
required: true
|
required: true
|
||||||
default: null
|
default: null
|
||||||
- option:
|
option:
|
||||||
description:
|
description:
|
||||||
- if set (required for changing a I(value)), this is the name of the option.
|
- if set (required for changing a I(value)), this is the name of the option.
|
||||||
- May be omitted if adding/removing a whole I(section).
|
- May be omitted if adding/removing a whole I(section).
|
||||||
required: false
|
required: false
|
||||||
default: []
|
default: []
|
||||||
- value:
|
value:
|
||||||
description:
|
description:
|
||||||
- the string value to be associated with an I(option). May be omitted when
|
- the string value to be associated with an I(option). May be omitted when removing an I(option).
|
||||||
removing an I(option).
|
required: false
|
||||||
required: false
|
default: []
|
||||||
default: []
|
backup:
|
||||||
- backup:
|
description:
|
||||||
description:
|
- Create a backup file including the timestamp information so you can get
|
||||||
- Create a backup file including the timestamp information so you can get
|
the original file back if you somehow clobbered it incorrectly.
|
||||||
the original file back if you somehow clobbered it incorrectly.
|
required: false
|
||||||
required: false
|
default: no
|
||||||
default: no
|
choices: [ "yes", "no" ]
|
||||||
choices: [ "yes", "no" ]
|
others:
|
||||||
- others:
|
description:
|
||||||
description:
|
- all arguments accepted by the M(file) module also work here
|
||||||
- all arguments accepted by the M(file) module also work here
|
required: false
|
||||||
required: false
|
|
||||||
notes:
|
notes:
|
||||||
- While it is possible to add an I(option) without specifying a I(value), this makes
|
- While it is possible to add an I(option) without specifying a I(value), this makes
|
||||||
no sense.
|
no sense.
|
||||||
|
|
76
lineinfile
76
lineinfile
|
@ -31,44 +31,44 @@ description:
|
||||||
file only. For other cases, see the M(copy) or M(template) modules.
|
file only. For other cases, see the M(copy) or M(template) modules.
|
||||||
version_added: "0.7"
|
version_added: "0.7"
|
||||||
options:
|
options:
|
||||||
- name:
|
name:
|
||||||
required: true
|
required: true
|
||||||
description:
|
description:
|
||||||
- The file to modify
|
- The file to modify
|
||||||
- regexp:
|
regexp:
|
||||||
required: true
|
required: true
|
||||||
description:
|
description:
|
||||||
- The regular expression to look for in the file. For I(state=present),
|
- The regular expression to look for in the file. For I(state=present),
|
||||||
the pattern to replace. For I(state=absent), the pattern of the line
|
the pattern to replace. For I(state=absent), the pattern of the line
|
||||||
to remove.
|
to remove.
|
||||||
- state:
|
state:
|
||||||
required: false
|
required: false
|
||||||
choices: [ present, absent ]
|
choices: [ present, absent ]
|
||||||
default: "present"
|
default: "present"
|
||||||
aliases: []
|
aliases: []
|
||||||
description:
|
description:
|
||||||
- Whether the line should be there or not.
|
- Whether the line should be there or not.
|
||||||
- line:
|
line:
|
||||||
required: false
|
required: false
|
||||||
description:
|
description:
|
||||||
- Required for I(state=present). The line to insert/replace into the
|
- Required for I(state=present). The line to insert/replace into the
|
||||||
file. Must match the value given to C(regexp).
|
file. Must match the value given to C(regexp).
|
||||||
- insertafter:
|
insertafter:
|
||||||
required: false
|
required: false
|
||||||
default: EOF
|
default: EOF
|
||||||
description:
|
description:
|
||||||
- Used with I(state=present). If specified, the line will be inserted
|
- Used with I(state=present). If specified, the line will be inserted
|
||||||
after the specified regular expression. Two special values are
|
after the specified regular expression. Two special values are
|
||||||
available; C(BOF) for inserting the line at the beginning of the
|
available; C(BOF) for inserting the line at the beginning of the
|
||||||
file, and C(EOF) for inserting the line at the end of the file.
|
file, and C(EOF) for inserting the line at the end of the file.
|
||||||
choices: [ BOF, EOF ]
|
choices: [ BOF, EOF ]
|
||||||
default: EOF
|
default: EOF
|
||||||
- backup:
|
backup:
|
||||||
required: false
|
required: false
|
||||||
default: no
|
default: no
|
||||||
description:
|
description:
|
||||||
- Create a backup file including the timestamp information so you can
|
- Create a backup file including the timestamp information so you can
|
||||||
get the original file back if you somehow clobbered it incorrectly.
|
get the original file back if you somehow clobbered it incorrectly.
|
||||||
examples:
|
examples:
|
||||||
- code: lineinfile name=/etc/selinux/config regexp=^SELINUX= line=SELINUX=disabled
|
- code: lineinfile name=/etc/selinux/config regexp=^SELINUX= line=SELINUX=disabled
|
||||||
- code: lineinfile name=/etc/sudoers state=absent regexp="^%wheel"
|
- code: lineinfile name=/etc/sudoers state=absent regexp="^%wheel"
|
||||||
|
|
Loading…
Reference in a new issue