mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
update manpage output
This commit is contained in:
parent
155c3ca89e
commit
e766bb6a6c
2 changed files with 40 additions and 21 deletions
|
@ -2,12 +2,12 @@
|
||||||
.\" Title: ansible-modules
|
.\" Title: ansible-modules
|
||||||
.\" Author: [see the "AUTHOR" section]
|
.\" Author: [see the "AUTHOR" section]
|
||||||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
||||||
.\" Date: 02/26/2012
|
.\" Date: 02/27/2012
|
||||||
.\" Manual: System administration commands
|
.\" Manual: System administration commands
|
||||||
.\" Source: Ansible-modules 0.0.1
|
.\" Source: Ansible-modules 0.0.1
|
||||||
.\" Language: English
|
.\" Language: English
|
||||||
.\"
|
.\"
|
||||||
.TH "ANSIBLE\-MODULES" "5" "02/26/2012" "Ansible\-modules 0\&.0\&.1" "System administration commands"
|
.TH "ANSIBLE\-MODULES" "5" "02/27/2012" "Ansible\-modules 0\&.0\&.1" "System administration commands"
|
||||||
.\" -----------------------------------------------------------------
|
.\" -----------------------------------------------------------------
|
||||||
.\" * set default formatting
|
.\" * set default formatting
|
||||||
.\" -----------------------------------------------------------------
|
.\" -----------------------------------------------------------------
|
||||||
|
@ -25,7 +25,9 @@ ansible-modules \- stock modules shipped with ansible
|
||||||
Ansible ships with a number of modules that can be executed directly on remote hosts or through ansible playbooks\&.
|
Ansible ships with a number of modules that can be executed directly on remote hosts or through ansible playbooks\&.
|
||||||
.SH "IDEMPOTENCE"
|
.SH "IDEMPOTENCE"
|
||||||
.sp
|
.sp
|
||||||
Most modules other than command are idempotent, meaning they will seek to avoid changes unless a change needs to be made\&. When using ansible playbooks, these modules can trigger change events\&. Unless otherwise noted, all modules support change hooks\&.
|
Most modules other than command are idempotent, meaning they will seek to avoid changes unless a change needs to be made\&. When using ansible playbooks, these modules can trigger change events, as described in ansible\-playbooks (5)\&.
|
||||||
|
.sp
|
||||||
|
Unless otherwise noted, all modules support change hooks\&.
|
||||||
.SH "COMMAND"
|
.SH "COMMAND"
|
||||||
.sp
|
.sp
|
||||||
The command module takes the command name followed by a list of arguments, space delimited\&. This is the only module that does not use key=value style parameters\&.
|
The command module takes the command name followed by a list of arguments, space delimited\&. This is the only module that does not use key=value style parameters\&.
|
||||||
|
@ -39,10 +41,10 @@ This module does not support change hooks\&.
|
||||||
.sp
|
.sp
|
||||||
Returns the return code from the program as well as timing information\&.
|
Returns the return code from the program as well as timing information\&.
|
||||||
.sp
|
.sp
|
||||||
Async command running and command execution time limits are in plan\&. These will probably be special keyvalue parameters expressed on the end of the command line, like ANSTIMEOUT=1 and ANS_ASYNC=1 or similar\&.
|
(Async command running and command execution time limits are in plan\&.)
|
||||||
.SH "COPY"
|
.SH "COPY"
|
||||||
.sp
|
.sp
|
||||||
The copy module takes a list of source files
|
The copy module moves a file on the local box to remote locations\&.
|
||||||
.PP
|
.PP
|
||||||
\fBsrc=\fR
|
\fBsrc=\fR
|
||||||
.RS 4
|
.RS 4
|
||||||
|
@ -72,8 +74,22 @@ In plan\&.
|
||||||
.SH "GIT"
|
.SH "GIT"
|
||||||
.sp
|
.sp
|
||||||
Deploys software from git checkouts\&.
|
Deploys software from git checkouts\&.
|
||||||
.sp
|
.PP
|
||||||
This module is in plan\&.
|
\fBrepo=\fR
|
||||||
|
.RS 4
|
||||||
|
git or http protocol address of the repo to checkout
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
\fBdest=\fR
|
||||||
|
.RS 4
|
||||||
|
where to check it out, an absolute directory path
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
\fBversion=\fR
|
||||||
|
.RS 4
|
||||||
|
what version to check out \(em either the git SHA, the literal string
|
||||||
|
\fIHEAD\fR, or a tag name
|
||||||
|
.RE
|
||||||
.SH "OHAI"
|
.SH "OHAI"
|
||||||
.sp
|
.sp
|
||||||
Similar to the facter module, this returns JSON inventory data\&. Ohai data is a bit more verbose and nested than facter\&.
|
Similar to the facter module, this returns JSON inventory data\&. Ohai data is a bit more verbose and nested than facter\&.
|
||||||
|
@ -115,6 +131,11 @@ Writes a JSON file containing key/value data, for use in templating\&. Call this
|
||||||
Optionally overrides the default JSON file location of /etc/ansible/setup\&. If used, also supply the metadata parameter to
|
Optionally overrides the default JSON file location of /etc/ansible/setup\&. If used, also supply the metadata parameter to
|
||||||
\fItemplate\fR\&. Change if running as a non\-root remote user who does not have permissions on /etc/ansible\&.
|
\fItemplate\fR\&. Change if running as a non\-root remote user who does not have permissions on /etc/ansible\&.
|
||||||
.RE
|
.RE
|
||||||
|
.PP
|
||||||
|
\fBanything=\fR
|
||||||
|
.RS 4
|
||||||
|
any other parameters can be named basically anything, and set a key=value pair in the JSON file for use in templating\&.
|
||||||
|
.RE
|
||||||
.SH "TEMPLATE"
|
.SH "TEMPLATE"
|
||||||
.sp
|
.sp
|
||||||
Templates a file out to a remote server\&. Call the setup module prior to usage\&.
|
Templates a file out to a remote server\&. Call the setup module prior to usage\&.
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
.\" Title: ansible-modules
|
.\" Title: ansible-modules
|
||||||
.\" Author: [see the "AUTHOR" section]
|
.\" Author: [see the "AUTHOR" section]
|
||||||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
||||||
.\" Date: 02/26/2012
|
.\" Date: 02/27/2012
|
||||||
.\" Manual: System administration commands
|
.\" Manual: System administration commands
|
||||||
.\" Source: Ansible-playbook 0.0.1
|
.\" Source: Ansible-playbook 0.0.1
|
||||||
.\" Language: English
|
.\" Language: English
|
||||||
.\"
|
.\"
|
||||||
.TH "ANSIBLE\-MODULES" "5" "02/26/2012" "Ansible\-playbook 0\&.0\&.1" "System administration commands"
|
.TH "ANSIBLE\-MODULES" "5" "02/27/2012" "Ansible\-playbook 0\&.0\&.1" "System administration commands"
|
||||||
.\" -----------------------------------------------------------------
|
.\" -----------------------------------------------------------------
|
||||||
.\" * set default formatting
|
.\" * set default formatting
|
||||||
.\" -----------------------------------------------------------------
|
.\" -----------------------------------------------------------------
|
||||||
|
@ -28,8 +28,6 @@ Ansible ships with a ansible\-playbook tool for running playbooks\&. Playbooks c
|
||||||
Playbooks are currently writeable in YAML\&. Other formats (JSON?) may be supported in the future\&.
|
Playbooks are currently writeable in YAML\&. Other formats (JSON?) may be supported in the future\&.
|
||||||
.SH "EXAMPLE"
|
.SH "EXAMPLE"
|
||||||
.sp
|
.sp
|
||||||
FIXME: verify this is correct below
|
|
||||||
.sp
|
|
||||||
.if n \{\
|
.if n \{\
|
||||||
.RS 4
|
.RS 4
|
||||||
.\}
|
.\}
|
||||||
|
@ -38,17 +36,17 @@ FIXME: verify this is correct below
|
||||||
\- pattern: \'*\'
|
\- pattern: \'*\'
|
||||||
hosts: \'/etc/ansible/hosts\'
|
hosts: \'/etc/ansible/hosts\'
|
||||||
tasks:
|
tasks:
|
||||||
\- name:configure template & module variables for future template calls
|
\- name: configure template & module variables for future template calls
|
||||||
action: setup http_port=80 max_clients=200
|
action: setup http_port=80 max_clients=200
|
||||||
\- name: write the apache config file
|
\- name: write the apache config file
|
||||||
action: template src=/srv/mytemplates/httpd\&.j2 dest=/etc/httpd/conf
|
action: template src=/srv/templates/httpd\&.j2 dest=/etc/httpd/conf
|
||||||
notify:
|
notify:
|
||||||
\- restart apache
|
\- restart apache
|
||||||
\- name: ensure apache is running
|
\- name: ensure apache is running
|
||||||
action: service name=httpd ensure=started
|
action: service name=httpd state=started
|
||||||
handlers:
|
handlers:
|
||||||
\- name: restart apache
|
\- name: restart apache
|
||||||
\- action: service name=httpd ensure=restarted
|
\- action: service name=httpd state=restarted
|
||||||
.fi
|
.fi
|
||||||
.if n \{\
|
.if n \{\
|
||||||
.RE
|
.RE
|
||||||
|
@ -59,9 +57,9 @@ Here\(cqs what the above example will do\&.
|
||||||
.sp
|
.sp
|
||||||
For all hosts in /etc/ansible/hosts (one host per line) that are named \fIwebserver\-anything\fR, first write a JSON file into /etc/ansible/setup on each remote system with the values max_clients and http_port\&.
|
For all hosts in /etc/ansible/hosts (one host per line) that are named \fIwebserver\-anything\fR, first write a JSON file into /etc/ansible/setup on each remote system with the values max_clients and http_port\&.
|
||||||
.sp
|
.sp
|
||||||
Next, use a Jinja2 template locally residing at /srv/mytemplates/httpd\&.j2 to write the Apache config file on each host to the path /etc/httpd/conf, using the previous values\&.
|
Next, use a Jinja2 template locally residing at /srv/templates/httpd\&.j2 to write the Apache config file on each host to the path /etc/httpd/conf, using the previous values\&.
|
||||||
.sp
|
.sp
|
||||||
Ensure that apache is running if stopped\&.
|
We\(cqll ensure that apache is running if stopped\&.
|
||||||
.sp
|
.sp
|
||||||
If and only if the config file changed, note that we need to restart apache at the end of the run, otherwise, don\(cqt bother because we already know it is running\&.
|
If and only if the config file changed, note that we need to restart apache at the end of the run, otherwise, don\(cqt bother because we already know it is running\&.
|
||||||
.SH "HIGH LEVEL EXPLANATION"
|
.SH "HIGH LEVEL EXPLANATION"
|
||||||
|
@ -70,14 +68,14 @@ Playbooks are executed top down and can contain multiple references to patterns\
|
||||||
.sp
|
.sp
|
||||||
For each pattern, the tasks in the \fItasks\fR list are executed in order for all hosts in the host file matching the pattern\&.
|
For each pattern, the tasks in the \fItasks\fR list are executed in order for all hosts in the host file matching the pattern\&.
|
||||||
.sp
|
.sp
|
||||||
For each task, a name/action pair describes what the task is and what ansible module to use to accomplish the task, along with any arguments\&. Additional fields like \fIcomment:\fR can be added and will be ignored\&.
|
For each task, a name/action pair describes what the task is and what ansible module to use to accomplish the task, along with any arguments\&. Additional fields like \fIcomment:\fR can be added and will be ignored, so feel free to take notes in the file\&.
|
||||||
.sp
|
.sp
|
||||||
Most modules accept key=value format arguments\&.
|
Most modules accept key=value format arguments\&.
|
||||||
.sp
|
.sp
|
||||||
Handlers are like tasks, but are conditionally executed\&. If a module reports a \fIchange\fR, it can choose to notify a handler by name\&. If notified, it will run only for hosts that changed\&.
|
Handlers are like tasks, but are conditionally executed\&. If a module reports a \fIchange\fR, it can notify one or more handler by name\&. If notified, it will run only for hosts that changed\&.
|
||||||
.SH "FUTURE BEHAVIOR"
|
.SH "ERROR HANDLING"
|
||||||
.sp
|
.sp
|
||||||
What the playbook run does with a host when an error is detected is currently being refined and is subject to change\&.
|
If a host has a failure, the host will be ignored for the remainder of the playbook execution\&.
|
||||||
.SH "AUTHOR"
|
.SH "AUTHOR"
|
||||||
.sp
|
.sp
|
||||||
Ansible was originally written by Michael DeHaan\&. See the AUTHORS file for a complete list of contributors\&.
|
Ansible was originally written by Michael DeHaan\&. See the AUTHORS file for a complete list of contributors\&.
|
||||||
|
|
Loading…
Reference in a new issue