mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Add manpage for ansible-playbook, since it is a command. More detailed docs will remain on the web site.
This commit is contained in:
parent
1699013fbd
commit
209760f8f6
6 changed files with 135 additions and 216 deletions
2
Makefile
2
Makefile
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
ASCII2MAN = a2x -D $(dir $@) -d manpage -f manpage $<
|
ASCII2MAN = a2x -D $(dir $@) -d manpage -f manpage $<
|
||||||
ASCII2HTMLMAN = a2x -D docs/html/man/ -d manpage -f xhtml
|
ASCII2HTMLMAN = a2x -D docs/html/man/ -d manpage -f xhtml
|
||||||
MANPAGES := docs/man/man1/ansible.1
|
MANPAGES := docs/man/man1/ansible.1 docs/man/man1/ansible-playbook.1
|
||||||
SITELIB = $(shell python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
|
SITELIB = $(shell python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
|
||||||
|
|
||||||
all: clean python
|
all: clean python
|
||||||
|
|
|
@ -1,203 +0,0 @@
|
||||||
Comparisons
|
|
||||||
===========
|
|
||||||
|
|
||||||
Confused about how Ansible fits in? Here's a comparison with some common tools.
|
|
||||||
|
|
||||||
Accuracy is important, so corrections are VERY welcome if we've got something wrong.
|
|
||||||
For space reasons, we can't list everybody's favorite management tool.
|
|
||||||
|
|
||||||
Ansible mainly tries to be different in it's goals of minimalism, while also cutting across
|
|
||||||
the categories of configuration management, deployment, and ad-hoc task firing.
|
|
||||||
|
|
||||||
It strives to be a super-easy to use app, requiring no daemons or databases, and having
|
|
||||||
a super-simple configuration management language that takes minutes to learn.
|
|
||||||
|
|
||||||
Generally speaking, Ansible is answer to the question "why is the world's systems
|
|
||||||
management software so complicated?" The code does not try to show off. It is an
|
|
||||||
experiment in radical simplicity and encourages anyone to be able to easily contribute to it.
|
|
||||||
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td></td>
|
|
||||||
<td><B><U>Ansible</U></B></font></td>
|
|
||||||
<td>Puppet</td>
|
|
||||||
<td>Chef</td>
|
|
||||||
<td>Func</td>
|
|
||||||
<td>Capistrano</td>
|
|
||||||
<td>mCollective</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Purpose</td>
|
|
||||||
<td><B>Config, Deployment, Ad-Hoc</B></td>
|
|
||||||
<td>Config, Deployment</td>
|
|
||||||
<td>Config, Deployment</td>
|
|
||||||
<td>Ad-Hoc</td>
|
|
||||||
<td>Deployment</td>
|
|
||||||
<td>Ad-Hoc</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Inspirations</td>
|
|
||||||
<td>Cobbler, Puppet, Func, Taboot</B></td>
|
|
||||||
<td>cfengine</td>
|
|
||||||
<td>puppet</td>
|
|
||||||
<td>sysadmin SSH scripts</td>
|
|
||||||
<td>sysadmin SSH scripts</td>
|
|
||||||
<td>Func, puppet</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>Config Language</td>
|
|
||||||
<td><B>Simple YAML format</B></td>
|
|
||||||
<td>Custom DSL</td>
|
|
||||||
<td>Ruby code</td>
|
|
||||||
<td>None</td>
|
|
||||||
<td>None</td>
|
|
||||||
<td>None</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Config Language Style</td>
|
|
||||||
<td><B>Very simple</B></td>
|
|
||||||
<td>Very rich, complex</td>
|
|
||||||
<td>Very rich, complex</td>
|
|
||||||
<td>None</td>
|
|
||||||
<td>None</td>
|
|
||||||
<td>None</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Config Ordering</td>
|
|
||||||
<td><B>Simply ordered, with notifiers</B></td>
|
|
||||||
<td>Strict dependency DAG</td>
|
|
||||||
<td>Simply ordered</td>
|
|
||||||
<td>None</td>
|
|
||||||
<td>Simply ordered</td>
|
|
||||||
<td>None</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Communication</td>
|
|
||||||
<td>SSH push</td>
|
|
||||||
<td>SSL pull or push trigger</td>
|
|
||||||
<td>SSL pull or push trigger(?)</td>
|
|
||||||
<td>SSL push</td>
|
|
||||||
<td>SSH</td>
|
|
||||||
<td>AMQP bus</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Daemons Required?</td>
|
|
||||||
<td><B>no</B></td>
|
|
||||||
<td>yes</td>
|
|
||||||
<td>yes</td>
|
|
||||||
<td>yes</td>
|
|
||||||
<td><B>no</B></td>
|
|
||||||
<td>yes</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Database Needed?</td>
|
|
||||||
<td><B>no</B></td>
|
|
||||||
<td>some features</td>
|
|
||||||
<td>yes</td>
|
|
||||||
<td><B>no</B></td>
|
|
||||||
<td><B>no</B></td>
|
|
||||||
<td>some features</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Message Bus Required?</td>
|
|
||||||
<td><B>no</B></td>
|
|
||||||
<td><B>no</B></td>
|
|
||||||
<td>yes</td>
|
|
||||||
<td><B>no</B></td>
|
|
||||||
<td><B>no</B></td>
|
|
||||||
<td>yes</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Inventory Features</td>
|
|
||||||
<td>planned</td>
|
|
||||||
<td><B>yes</B></td>
|
|
||||||
<td><B>yes?</B></td>
|
|
||||||
<td>some</td>
|
|
||||||
<td>no</td>
|
|
||||||
<td>no</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Implemented In</td>
|
|
||||||
<td>Python</td>
|
|
||||||
<td>Ruby</td>
|
|
||||||
<td>Ruby, Erlang</td>
|
|
||||||
<td>Python</td>
|
|
||||||
<td>Ruby</td>
|
|
||||||
<td>Ruby</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Extensible In</td>
|
|
||||||
<td><B>Anything</B></td>
|
|
||||||
<td>Ruby</td>
|
|
||||||
<td>Ruby</td>
|
|
||||||
<td>Python</td>
|
|
||||||
<td>Ruby</td>
|
|
||||||
<td>Ruby</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Codebase Size</td>
|
|
||||||
<td><B>Small</B></td>
|
|
||||||
<td>Large</td>
|
|
||||||
<td>Large</td>
|
|
||||||
<td>Medium</td>
|
|
||||||
<td>Medium</td>
|
|
||||||
<td>Medium</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Module Support</td>
|
|
||||||
<td>Emerging</td>
|
|
||||||
<td><B>Wide/Established</B></td>
|
|
||||||
<td><B>Wide/Established</B></td>
|
|
||||||
<td>Medium/Established</td>
|
|
||||||
<td>Poor</td>
|
|
||||||
<td>Medium/Established</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Users Targeted</td>
|
|
||||||
<td><B>Sysadmins, developers, QA, web admins</B></td>
|
|
||||||
<td>Sysadmins</td>
|
|
||||||
<td>Sysadmins, web admins</td>
|
|
||||||
<td>Sysadmins, developers</td>
|
|
||||||
<td>Web admins</td>
|
|
||||||
<td>Sysadmins</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Learning & Setup Curve</td>
|
|
||||||
<td><B>Minimal<B></td>
|
|
||||||
<td>High</td>
|
|
||||||
<td>High</td>
|
|
||||||
<td>Medium</td>
|
|
||||||
<td>Medium</td>
|
|
||||||
<td>Medium</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Can Easily Build Applications On It</td>
|
|
||||||
<td><B>Yes</B></td>
|
|
||||||
<td>No</td>
|
|
||||||
<td>No</td>
|
|
||||||
<td><B>Yes</B></td>
|
|
||||||
<td>No</td>
|
|
||||||
<td>Yes?</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Parallelism & Scaling Tech</td>
|
|
||||||
<td>Fork/Merge</td>
|
|
||||||
<td>Add Servers / Staged Commands / No Server</td>
|
|
||||||
<td>Adding More Erlang</td>
|
|
||||||
<td>Fork/Merge</td>
|
|
||||||
<td>No</td>
|
|
||||||
<td>Message Bus</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Delegated Hierachies</td>
|
|
||||||
<td>No</td>
|
|
||||||
<td>No</td>
|
|
||||||
<td>No</td>
|
|
||||||
<td><B>Yes</B></td>
|
|
||||||
<td>No</td>
|
|
||||||
<td><B>Yes</B></td>
|
|
||||||
</tr>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
|
|
89
docs/man/man1/ansible-playbook.1.asciidoc
Normal file
89
docs/man/man1/ansible-playbook.1.asciidoc
Normal file
|
@ -0,0 +1,89 @@
|
||||||
|
ansible-playbook(1)
|
||||||
|
===================
|
||||||
|
:doctype:manpage
|
||||||
|
:man source: Ansible
|
||||||
|
:man version: 0.0.1
|
||||||
|
:man manual: System administration commands
|
||||||
|
|
||||||
|
NAME
|
||||||
|
----
|
||||||
|
ansible-playbook - run an ansible playbook
|
||||||
|
|
||||||
|
|
||||||
|
SYNOPSIS
|
||||||
|
--------
|
||||||
|
ansible-playbook <filename.yml> ... [options]
|
||||||
|
|
||||||
|
|
||||||
|
DESCRIPTION
|
||||||
|
-----------
|
||||||
|
|
||||||
|
*Ansible playbooks* are a configuration and multinode deployment system. Ansible-playbook is the tool
|
||||||
|
used to run them. See the project home page (link below) for more information.
|
||||||
|
|
||||||
|
|
||||||
|
ARGUMENTS
|
||||||
|
---------
|
||||||
|
|
||||||
|
*filename.yml*::
|
||||||
|
|
||||||
|
The names of one or more YAML format files to run as ansible playbooks.
|
||||||
|
|
||||||
|
|
||||||
|
OPTIONS
|
||||||
|
-------
|
||||||
|
|
||||||
|
|
||||||
|
*-i*, *--inventory*::
|
||||||
|
|
||||||
|
Path to the inventory hosts file, which defaults to /etc/ansible/hosts.
|
||||||
|
|
||||||
|
|
||||||
|
*-M*, *--module-path*::
|
||||||
|
|
||||||
|
Where to load modules from. The default is /usr/share/ansible
|
||||||
|
|
||||||
|
|
||||||
|
*-f*, *--forks*::
|
||||||
|
|
||||||
|
Desired level of parallelism. Default 5.
|
||||||
|
|
||||||
|
|
||||||
|
*-k*, *--ask-pass*::
|
||||||
|
|
||||||
|
Prompt for the SSH password instead of assuming key-based authentication with ssh-agent.
|
||||||
|
|
||||||
|
|
||||||
|
ENVIRONMENT
|
||||||
|
-----------
|
||||||
|
|
||||||
|
The following environment variables may specified.
|
||||||
|
|
||||||
|
ANSIBLE_HOSTS -- Override the default ansible hosts file
|
||||||
|
|
||||||
|
ANSIBLE_LIBRARY -- Override the default ansible module library path
|
||||||
|
|
||||||
|
|
||||||
|
AUTHOR
|
||||||
|
------
|
||||||
|
|
||||||
|
Ansible was originally written by Michael DeHaan. See the AUTHORS file
|
||||||
|
for a complete list of contributors.
|
||||||
|
|
||||||
|
|
||||||
|
COPYRIGHT
|
||||||
|
---------
|
||||||
|
|
||||||
|
Copyright © 2012, Michael DeHaan
|
||||||
|
|
||||||
|
Ansible is released under the terms of the GPLv3 License.
|
||||||
|
|
||||||
|
|
||||||
|
SEE ALSO
|
||||||
|
--------
|
||||||
|
|
||||||
|
Extensive documentation as well as IRC and mailing list info
|
||||||
|
is available on the ansible home page: <https://ansible.github.com/>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -50,14 +50,44 @@ Level of parallelism. Specify as an integer, the default is 5.
|
||||||
Module name to execute.
|
Module name to execute.
|
||||||
|
|
||||||
|
|
||||||
*-p*, *--pattern*::
|
*-M*, *--module-path*::
|
||||||
|
|
||||||
Hostname pattern. Accepts shell-like globs which can be seperated with ";"
|
Where to load modules from. The default is /usr/share/ansible
|
||||||
The default is "*" which matches all hosts in the ansible hosts file. Group
|
|
||||||
names from the ansible inventory file can also be used.
|
|
||||||
|
|
||||||
|
|
||||||
See ansible --help for additional options.
|
*-a*, *--args*::
|
||||||
|
|
||||||
|
Arguments to pass to the module
|
||||||
|
|
||||||
|
|
||||||
|
*-k*, *--ask-pass*::
|
||||||
|
|
||||||
|
Prompt for the SSH password instead of assuming key-based authentication with ssh-agent.
|
||||||
|
|
||||||
|
|
||||||
|
*-o*, *--one-line*::
|
||||||
|
|
||||||
|
Try to output everything on one line.
|
||||||
|
|
||||||
|
|
||||||
|
*-t*, *--tree*::
|
||||||
|
|
||||||
|
Save contents in this output directory, with the results named in a file named after each host.
|
||||||
|
|
||||||
|
|
||||||
|
*-T*, *--timeout*::
|
||||||
|
|
||||||
|
Connection timeout to use when trying to talk to hosts, in seconds.
|
||||||
|
|
||||||
|
|
||||||
|
*-B*, *--background*::
|
||||||
|
|
||||||
|
Runs commands in the background, killing the task after N seconds.
|
||||||
|
|
||||||
|
|
||||||
|
*-u*, *--remote-user*::
|
||||||
|
|
||||||
|
Use this remote username instead of root
|
||||||
|
|
||||||
|
|
||||||
INVENTORY
|
INVENTORY
|
||||||
|
@ -70,9 +100,9 @@ are included on their own line, enclosed in square brackets.
|
||||||
FILES
|
FILES
|
||||||
-----
|
-----
|
||||||
|
|
||||||
/etc/ansible/hosts -- Default hosts file
|
/etc/ansible/hosts -- Default inventory file
|
||||||
|
|
||||||
/usr/share/ansible -- Default module library
|
/usr/share/ansible/ -- Default module library
|
||||||
|
|
||||||
|
|
||||||
ENVIRONMENT
|
ENVIRONMENT
|
||||||
|
@ -103,6 +133,8 @@ Ansible is released under the terms of the GPLv3 License.
|
||||||
SEE ALSO
|
SEE ALSO
|
||||||
--------
|
--------
|
||||||
|
|
||||||
Ansible home page: <https://ansible.github.com/>
|
Extensive documentation as well as IRC and mailing list info
|
||||||
|
is available on the ansible home page: <https://ansible.github.com/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
6
library/yum
Normal file → Executable file
6
library/yum
Normal file → Executable file
|
@ -56,9 +56,9 @@ def pkg_to_dict(po):
|
||||||
'_nevra':po.ui_nevra,
|
'_nevra':po.ui_nevra,
|
||||||
}
|
}
|
||||||
if type(po) == yum.rpmsack.RPMInstalledPackage:
|
if type(po) == yum.rpmsack.RPMInstalledPackage:
|
||||||
d['state'] = 'installed'
|
d['yumstate'] = 'installed'
|
||||||
else:
|
else:
|
||||||
d['state'] = 'available'
|
d['yumstate'] = 'available'
|
||||||
|
|
||||||
return d
|
return d
|
||||||
|
|
||||||
|
@ -220,7 +220,7 @@ def main():
|
||||||
if 'list' in params:
|
if 'list' in params:
|
||||||
my = yum_base(conf_file=params['conf_file'], cachedir=True)
|
my = yum_base(conf_file=params['conf_file'], cachedir=True)
|
||||||
results = list_stuff(my, params['list'])
|
results = list_stuff(my, params['list'])
|
||||||
elif 'ensure' in params:
|
elif 'state' in params:
|
||||||
my = yum_base(conf_file=params['conf_file'], cachedir=True)
|
my = yum_base(conf_file=params['conf_file'], cachedir=True)
|
||||||
state = params['state']
|
state = params['state']
|
||||||
pkgspec = params['pkg']
|
pkgspec = params['pkg']
|
||||||
|
|
3
setup.py
3
setup.py
|
@ -26,7 +26,8 @@ setup(name='ansible',
|
||||||
'library/git',
|
'library/git',
|
||||||
]),
|
]),
|
||||||
('/usr/share/man/man1', [
|
('/usr/share/man/man1', [
|
||||||
'docs/man/man1/ansible.1'
|
'docs/man/man1/ansible.1',
|
||||||
|
'docs/man/man1/ansible-playbook.1'
|
||||||
]),
|
]),
|
||||||
],
|
],
|
||||||
scripts=[
|
scripts=[
|
||||||
|
|
Loading…
Reference in a new issue