... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
|
3 | 3 |
ASCII2MAN = a2x -D $(dir $@) -d manpage -f manpage $< |
4 | 4 |
ASCII2HTMLMAN = a2x -D docs/html/man/ -d manpage -f xhtml |
5 |
-MANPAGES := docs/man/man1/ansible.1 |
|
5 |
+MANPAGES := docs/man/man1/ansible.1 docs/man/man1/ansible-playbook.1 |
|
6 | 6 |
SITELIB = $(shell python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()") |
7 | 7 |
|
8 | 8 |
all: clean python |
9 | 9 |
deleted file mode 100644 |
... | ... |
@@ -1,203 +0,0 @@ |
1 |
-Comparisons |
|
2 |
-=========== |
|
3 |
- |
|
4 |
-Confused about how Ansible fits in? Here's a comparison with some common tools. |
|
5 |
- |
|
6 |
-Accuracy is important, so corrections are VERY welcome if we've got something wrong. |
|
7 |
-For space reasons, we can't list everybody's favorite management tool. |
|
8 |
- |
|
9 |
-Ansible mainly tries to be different in it's goals of minimalism, while also cutting across |
|
10 |
-the categories of configuration management, deployment, and ad-hoc task firing. |
|
11 |
- |
|
12 |
-It strives to be a super-easy to use app, requiring no daemons or databases, and having |
|
13 |
-a super-simple configuration management language that takes minutes to learn. |
|
14 |
- |
|
15 |
-Generally speaking, Ansible is answer to the question "why is the world's systems |
|
16 |
-management software so complicated?" The code does not try to show off. It is an |
|
17 |
-experiment in radical simplicity and encourages anyone to be able to easily contribute to it. |
|
18 |
- |
|
19 |
-<table> |
|
20 |
- <tr> |
|
21 |
- <td></td> |
|
22 |
- <td><B><U>Ansible</U></B></font></td> |
|
23 |
- <td>Puppet</td> |
|
24 |
- <td>Chef</td> |
|
25 |
- <td>Func</td> |
|
26 |
- <td>Capistrano</td> |
|
27 |
- <td>mCollective</td> |
|
28 |
- </tr> |
|
29 |
- <tr> |
|
30 |
- <td>Purpose</td> |
|
31 |
- <td><B>Config, Deployment, Ad-Hoc</B></td> |
|
32 |
- <td>Config, Deployment</td> |
|
33 |
- <td>Config, Deployment</td> |
|
34 |
- <td>Ad-Hoc</td> |
|
35 |
- <td>Deployment</td> |
|
36 |
- <td>Ad-Hoc</td> |
|
37 |
- </tr> |
|
38 |
- <tr> |
|
39 |
- <td>Inspirations</td> |
|
40 |
- <td>Cobbler, Puppet, Func, Taboot</B></td> |
|
41 |
- <td>cfengine</td> |
|
42 |
- <td>puppet</td> |
|
43 |
- <td>sysadmin SSH scripts</td> |
|
44 |
- <td>sysadmin SSH scripts</td> |
|
45 |
- <td>Func, puppet</td> |
|
46 |
- </tr> |
|
47 |
- |
|
48 |
- <tr> |
|
49 |
- <td>Config Language</td> |
|
50 |
- <td><B>Simple YAML format</B></td> |
|
51 |
- <td>Custom DSL</td> |
|
52 |
- <td>Ruby code</td> |
|
53 |
- <td>None</td> |
|
54 |
- <td>None</td> |
|
55 |
- <td>None</td> |
|
56 |
- </tr> |
|
57 |
- <tr> |
|
58 |
- <td>Config Language Style</td> |
|
59 |
- <td><B>Very simple</B></td> |
|
60 |
- <td>Very rich, complex</td> |
|
61 |
- <td>Very rich, complex</td> |
|
62 |
- <td>None</td> |
|
63 |
- <td>None</td> |
|
64 |
- <td>None</td> |
|
65 |
- </tr> |
|
66 |
- <tr> |
|
67 |
- <td>Config Ordering</td> |
|
68 |
- <td><B>Simply ordered, with notifiers</B></td> |
|
69 |
- <td>Strict dependency DAG</td> |
|
70 |
- <td>Simply ordered</td> |
|
71 |
- <td>None</td> |
|
72 |
- <td>Simply ordered</td> |
|
73 |
- <td>None</td> |
|
74 |
- </tr> |
|
75 |
- <tr> |
|
76 |
- <td>Communication</td> |
|
77 |
- <td>SSH push</td> |
|
78 |
- <td>SSL pull or push trigger</td> |
|
79 |
- <td>SSL pull or push trigger(?)</td> |
|
80 |
- <td>SSL push</td> |
|
81 |
- <td>SSH</td> |
|
82 |
- <td>AMQP bus</td> |
|
83 |
- </tr> |
|
84 |
- <tr> |
|
85 |
- <td>Daemons Required?</td> |
|
86 |
- <td><B>no</B></td> |
|
87 |
- <td>yes</td> |
|
88 |
- <td>yes</td> |
|
89 |
- <td>yes</td> |
|
90 |
- <td><B>no</B></td> |
|
91 |
- <td>yes</td> |
|
92 |
- </tr> |
|
93 |
- <tr> |
|
94 |
- <td>Database Needed?</td> |
|
95 |
- <td><B>no</B></td> |
|
96 |
- <td>some features</td> |
|
97 |
- <td>yes</td> |
|
98 |
- <td><B>no</B></td> |
|
99 |
- <td><B>no</B></td> |
|
100 |
- <td>some features</td> |
|
101 |
- </tr> |
|
102 |
- <tr> |
|
103 |
- <td>Message Bus Required?</td> |
|
104 |
- <td><B>no</B></td> |
|
105 |
- <td><B>no</B></td> |
|
106 |
- <td>yes</td> |
|
107 |
- <td><B>no</B></td> |
|
108 |
- <td><B>no</B></td> |
|
109 |
- <td>yes</td> |
|
110 |
- </tr> |
|
111 |
- <tr> |
|
112 |
- <td>Inventory Features</td> |
|
113 |
- <td>planned</td> |
|
114 |
- <td><B>yes</B></td> |
|
115 |
- <td><B>yes?</B></td> |
|
116 |
- <td>some</td> |
|
117 |
- <td>no</td> |
|
118 |
- <td>no</td> |
|
119 |
- </tr> |
|
120 |
- <tr> |
|
121 |
- <td>Implemented In</td> |
|
122 |
- <td>Python</td> |
|
123 |
- <td>Ruby</td> |
|
124 |
- <td>Ruby, Erlang</td> |
|
125 |
- <td>Python</td> |
|
126 |
- <td>Ruby</td> |
|
127 |
- <td>Ruby</td> |
|
128 |
- </tr> |
|
129 |
- <tr> |
|
130 |
- <td>Extensible In</td> |
|
131 |
- <td><B>Anything</B></td> |
|
132 |
- <td>Ruby</td> |
|
133 |
- <td>Ruby</td> |
|
134 |
- <td>Python</td> |
|
135 |
- <td>Ruby</td> |
|
136 |
- <td>Ruby</td> |
|
137 |
- </tr> |
|
138 |
- <tr> |
|
139 |
- <td>Codebase Size</td> |
|
140 |
- <td><B>Small</B></td> |
|
141 |
- <td>Large</td> |
|
142 |
- <td>Large</td> |
|
143 |
- <td>Medium</td> |
|
144 |
- <td>Medium</td> |
|
145 |
- <td>Medium</td> |
|
146 |
- </tr> |
|
147 |
- <tr> |
|
148 |
- <td>Module Support</td> |
|
149 |
- <td>Emerging</td> |
|
150 |
- <td><B>Wide/Established</B></td> |
|
151 |
- <td><B>Wide/Established</B></td> |
|
152 |
- <td>Medium/Established</td> |
|
153 |
- <td>Poor</td> |
|
154 |
- <td>Medium/Established</td> |
|
155 |
- </tr> |
|
156 |
- <tr> |
|
157 |
- <td>Users Targeted</td> |
|
158 |
- <td><B>Sysadmins, developers, QA, web admins</B></td> |
|
159 |
- <td>Sysadmins</td> |
|
160 |
- <td>Sysadmins, web admins</td> |
|
161 |
- <td>Sysadmins, developers</td> |
|
162 |
- <td>Web admins</td> |
|
163 |
- <td>Sysadmins</td> |
|
164 |
- </tr> |
|
165 |
- <tr> |
|
166 |
- <td>Learning & Setup Curve</td> |
|
167 |
- <td><B>Minimal<B></td> |
|
168 |
- <td>High</td> |
|
169 |
- <td>High</td> |
|
170 |
- <td>Medium</td> |
|
171 |
- <td>Medium</td> |
|
172 |
- <td>Medium</td> |
|
173 |
- </tr> |
|
174 |
- <tr> |
|
175 |
- <td>Can Easily Build Applications On It</td> |
|
176 |
- <td><B>Yes</B></td> |
|
177 |
- <td>No</td> |
|
178 |
- <td>No</td> |
|
179 |
- <td><B>Yes</B></td> |
|
180 |
- <td>No</td> |
|
181 |
- <td>Yes?</td> |
|
182 |
- </tr> |
|
183 |
- <tr> |
|
184 |
- <td>Parallelism & Scaling Tech</td> |
|
185 |
- <td>Fork/Merge</td> |
|
186 |
- <td>Add Servers / Staged Commands / No Server</td> |
|
187 |
- <td>Adding More Erlang</td> |
|
188 |
- <td>Fork/Merge</td> |
|
189 |
- <td>No</td> |
|
190 |
- <td>Message Bus</td> |
|
191 |
- </tr> |
|
192 |
- <tr> |
|
193 |
- <td>Delegated Hierachies</td> |
|
194 |
- <td>No</td> |
|
195 |
- <td>No</td> |
|
196 |
- <td>No</td> |
|
197 |
- <td><B>Yes</B></td> |
|
198 |
- <td>No</td> |
|
199 |
- <td><B>Yes</B></td> |
|
200 |
- </tr> |
|
201 |
-</td> |
|
202 |
- |
|
203 |
- |
204 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,89 @@ |
0 |
+ansible-playbook(1) |
|
1 |
+=================== |
|
2 |
+:doctype:manpage |
|
3 |
+:man source: Ansible |
|
4 |
+:man version: 0.0.1 |
|
5 |
+:man manual: System administration commands |
|
6 |
+ |
|
7 |
+NAME |
|
8 |
+---- |
|
9 |
+ansible-playbook - run an ansible playbook |
|
10 |
+ |
|
11 |
+ |
|
12 |
+SYNOPSIS |
|
13 |
+-------- |
|
14 |
+ansible-playbook <filename.yml> ... [options] |
|
15 |
+ |
|
16 |
+ |
|
17 |
+DESCRIPTION |
|
18 |
+----------- |
|
19 |
+ |
|
20 |
+*Ansible playbooks* are a configuration and multinode deployment system. Ansible-playbook is the tool |
|
21 |
+used to run them. See the project home page (link below) for more information. |
|
22 |
+ |
|
23 |
+ |
|
24 |
+ARGUMENTS |
|
25 |
+--------- |
|
26 |
+ |
|
27 |
+*filename.yml*:: |
|
28 |
+ |
|
29 |
+The names of one or more YAML format files to run as ansible playbooks. |
|
30 |
+ |
|
31 |
+ |
|
32 |
+OPTIONS |
|
33 |
+------- |
|
34 |
+ |
|
35 |
+ |
|
36 |
+*-i*, *--inventory*:: |
|
37 |
+ |
|
38 |
+Path to the inventory hosts file, which defaults to /etc/ansible/hosts. |
|
39 |
+ |
|
40 |
+ |
|
41 |
+*-M*, *--module-path*:: |
|
42 |
+ |
|
43 |
+Where to load modules from. The default is /usr/share/ansible |
|
44 |
+ |
|
45 |
+ |
|
46 |
+*-f*, *--forks*:: |
|
47 |
+ |
|
48 |
+Desired level of parallelism. Default 5. |
|
49 |
+ |
|
50 |
+ |
|
51 |
+*-k*, *--ask-pass*:: |
|
52 |
+ |
|
53 |
+Prompt for the SSH password instead of assuming key-based authentication with ssh-agent. |
|
54 |
+ |
|
55 |
+ |
|
56 |
+ENVIRONMENT |
|
57 |
+----------- |
|
58 |
+ |
|
59 |
+The following environment variables may specified. |
|
60 |
+ |
|
61 |
+ANSIBLE_HOSTS -- Override the default ansible hosts file |
|
62 |
+ |
|
63 |
+ANSIBLE_LIBRARY -- Override the default ansible module library path |
|
64 |
+ |
|
65 |
+ |
|
66 |
+AUTHOR |
|
67 |
+------ |
|
68 |
+ |
|
69 |
+Ansible was originally written by Michael DeHaan. See the AUTHORS file |
|
70 |
+for a complete list of contributors. |
|
71 |
+ |
|
72 |
+ |
|
73 |
+COPYRIGHT |
|
74 |
+--------- |
|
75 |
+ |
|
76 |
+Copyright © 2012, Michael DeHaan |
|
77 |
+ |
|
78 |
+Ansible is released under the terms of the GPLv3 License. |
|
79 |
+ |
|
80 |
+ |
|
81 |
+SEE ALSO |
|
82 |
+-------- |
|
83 |
+ |
|
84 |
+Extensive documentation as well as IRC and mailing list info |
|
85 |
+is available on the ansible home page: <https://ansible.github.com/> |
|
86 |
+ |
|
87 |
+ |
|
88 |
+ |
... | ... |
@@ -50,14 +50,44 @@ Level of parallelism. Specify as an integer, the default is 5. |
50 | 50 |
Module name to execute. |
51 | 51 |
|
52 | 52 |
|
53 |
-*-p*, *--pattern*:: |
|
53 |
+*-M*, *--module-path*:: |
|
54 | 54 |
|
55 |
-Hostname pattern. Accepts shell-like globs which can be seperated with ";" |
|
56 |
-The default is "*" which matches all hosts in the ansible hosts file. Group |
|
57 |
-names from the ansible inventory file can also be used. |
|
55 |
+Where to load modules from. The default is /usr/share/ansible |
|
58 | 56 |
|
59 | 57 |
|
60 |
-See ansible --help for additional options. |
|
58 |
+*-a*, *--args*:: |
|
59 |
+ |
|
60 |
+Arguments to pass to the module |
|
61 |
+ |
|
62 |
+ |
|
63 |
+*-k*, *--ask-pass*:: |
|
64 |
+ |
|
65 |
+Prompt for the SSH password instead of assuming key-based authentication with ssh-agent. |
|
66 |
+ |
|
67 |
+ |
|
68 |
+*-o*, *--one-line*:: |
|
69 |
+ |
|
70 |
+Try to output everything on one line. |
|
71 |
+ |
|
72 |
+ |
|
73 |
+*-t*, *--tree*:: |
|
74 |
+ |
|
75 |
+Save contents in this output directory, with the results named in a file named after each host. |
|
76 |
+ |
|
77 |
+ |
|
78 |
+*-T*, *--timeout*:: |
|
79 |
+ |
|
80 |
+Connection timeout to use when trying to talk to hosts, in seconds. |
|
81 |
+ |
|
82 |
+ |
|
83 |
+*-B*, *--background*:: |
|
84 |
+ |
|
85 |
+Runs commands in the background, killing the task after N seconds. |
|
86 |
+ |
|
87 |
+ |
|
88 |
+*-u*, *--remote-user*:: |
|
89 |
+ |
|
90 |
+Use this remote username instead of root |
|
61 | 91 |
|
62 | 92 |
|
63 | 93 |
INVENTORY |
... | ... |
@@ -70,9 +100,9 @@ are included on their own line, enclosed in square brackets. |
70 | 70 |
FILES |
71 | 71 |
----- |
72 | 72 |
|
73 |
-/etc/ansible/hosts -- Default hosts file |
|
73 |
+/etc/ansible/hosts -- Default inventory file |
|
74 | 74 |
|
75 |
-/usr/share/ansible -- Default module library |
|
75 |
+/usr/share/ansible/ -- Default module library |
|
76 | 76 |
|
77 | 77 |
|
78 | 78 |
ENVIRONMENT |
... | ... |
@@ -103,6 +133,8 @@ Ansible is released under the terms of the GPLv3 License. |
103 | 103 |
SEE ALSO |
104 | 104 |
-------- |
105 | 105 |
|
106 |
-Ansible home page: <https://ansible.github.com/> |
|
106 |
+Extensive documentation as well as IRC and mailing list info |
|
107 |
+is available on the ansible home page: <https://ansible.github.com/> |
|
108 |
+ |
|
107 | 109 |
|
108 | 110 |
|
109 | 111 |
old mode 100644 |
110 | 112 |
new mode 100755 |
... | ... |
@@ -56,9 +56,9 @@ def pkg_to_dict(po): |
56 | 56 |
'_nevra':po.ui_nevra, |
57 | 57 |
} |
58 | 58 |
if type(po) == yum.rpmsack.RPMInstalledPackage: |
59 |
- d['state'] = 'installed' |
|
59 |
+ d['yumstate'] = 'installed' |
|
60 | 60 |
else: |
61 |
- d['state'] = 'available' |
|
61 |
+ d['yumstate'] = 'available' |
|
62 | 62 |
|
63 | 63 |
return d |
64 | 64 |
|
... | ... |
@@ -220,7 +220,7 @@ def main(): |
220 | 220 |
if 'list' in params: |
221 | 221 |
my = yum_base(conf_file=params['conf_file'], cachedir=True) |
222 | 222 |
results = list_stuff(my, params['list']) |
223 |
- elif 'ensure' in params: |
|
223 |
+ elif 'state' in params: |
|
224 | 224 |
my = yum_base(conf_file=params['conf_file'], cachedir=True) |
225 | 225 |
state = params['state'] |
226 | 226 |
pkgspec = params['pkg'] |