Browse code

Add some docs/examples

Add a basic ansible-pull man page.

Add the example playbooks/scripts to the RPM package.

Closes #841

Tim Bielawa authored on 2012/08/14 23:46:16
Showing 9 changed files
... ...
@@ -1,6 +1,7 @@
1 1
 include README.md packaging/rpm/ansible.spec COPYING
2 2
 include examples/hosts
3 3
 include examples/ansible.cfg
4
+graft examples/playbooks
4 5
 include packaging/distutils/setup.py
5 6
 recursive-include docs *
6 7
 recursive-include library *
... ...
@@ -21,7 +21,7 @@ NAME = "ansible"
21 21
 # directory of the target file ($@), kinda like `dirname`.
22 22
 ASCII2MAN = a2x -D $(dir $@) -d manpage -f manpage $<
23 23
 ASCII2HTMLMAN = a2x -D docs/html/man/ -d manpage -f xhtml
24
-MANPAGES := docs/man/man1/ansible.1 docs/man/man1/ansible-playbook.1
24
+MANPAGES := docs/man/man1/ansible.1 docs/man/man1/ansible-playbook.1 docs/man/man1/ansible-pull.1
25 25
 
26 26
 SITELIB = $(shell python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
27 27
 
... ...
@@ -1,13 +1,22 @@
1 1
 '\" t
2 2
 .\"     Title: ansible-playbook
3 3
 .\"    Author: [see the "AUTHOR" section]
4
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
5
-.\"      Date: 08/06/2012
4
+.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
5
+.\"      Date: 08/14/2012
6 6
 .\"    Manual: System administration commands
7 7
 .\"    Source: Ansible 0.7
8 8
 .\"  Language: English
9 9
 .\"
10
-.TH "ANSIBLE\-PLAYBOOK" "1" "08/06/2012" "Ansible 0\&.7" "System administration commands"
10
+.TH "ANSIBLE\-PLAYBOOK" "1" "08/14/2012" "Ansible 0\&.7" "System administration commands"
11
+.\" -----------------------------------------------------------------
12
+.\" * Define some portability stuff
13
+.\" -----------------------------------------------------------------
14
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
+.\" http://bugs.debian.org/507673
16
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
+.ie \n(.g .ds Aq \(aq
19
+.el       .ds Aq '
11 20
 .\" -----------------------------------------------------------------
12 21
 .\" * set default formatting
13 22
 .\" -----------------------------------------------------------------
... ...
@@ -36,7 +45,7 @@ The names of one or more YAML format files to run as ansible playbooks\&.
36 36
 .sp
37 37
 \fB\-v\fR, \fB\-\-verbose\fR
38 38
 .sp
39
-Verbose mode, more output from successful actions will be shown
39
+Verbose mode, more output from successful actions will be shown\&.
40 40
 .PP
41 41
 \fB\-i\fR \fIPATH\fR, \fB\-\-inventory=\fR\fIPATH\fR
42 42
 .RS 4
... ...
@@ -73,7 +82,12 @@ Prompt for the SSH password instead of assuming key\-based authentication with s
73 73
 .PP
74 74
 \fB\-K\fR, \fB\-\-ask\-sudo\-pass\fR
75 75
 .RS 4
76
-Prompt for the password to use for playbook plays that request sudo access, if any
76
+Prompt for the password to use for playbook plays that request sudo access, if any\&.
77
+.RE
78
+.PP
79
+\fB\-U\fR, \fISUDO_USER\fR, \fB\-\-sudo\-user=\fR\fISUDO_USER\fR
80
+.RS 4
81
+Desired sudo user (default=root)\&.
77 82
 .RE
78 83
 .PP
79 84
 \fB\-T\fR \fISECONDS\fR, \fB\-\-timeout=\fR\fISECONDS\fR
... ...
@@ -91,6 +105,17 @@ Force all plays to use sudo, even if not marked as such\&.
91 91
 .RS 4
92 92
 Use this remote user name on playbook steps that do not indicate a user name to run as\&.
93 93
 .RE
94
+.PP
95
+\fB\-c\fR \fICONNECTION\fR, \fB\-\-connection=\fR\fICONNECTION\fR
96
+.RS 4
97
+Connection type to use\&. Possible options are
98
+\fIparamiko\fR
99
+(SSH),
100
+\fIssh\fR, and
101
+\fIlocal\fR\&.
102
+\fIlocal\fR
103
+is mostly useful for crontab or kickstarts\&.
104
+.RE
94 105
 .SH "ENVIRONMENT"
95 106
 .sp
96 107
 The following environment variables may specified\&.
... ...
@@ -108,6 +133,6 @@ Copyright \(co 2012, Michael DeHaan
108 108
 Ansible is released under the terms of the GPLv3 License\&.
109 109
 .SH "SEE ALSO"
110 110
 .sp
111
-\fBansible\fR(1)
111
+\fBansible\fR(1), \fBansible\-pull\fR(1)
112 112
 .sp
113 113
 Extensive documentation as well as IRC and mailing list info is available on the ansible home page: https://ansible\&.github\&.com/
... ...
@@ -122,7 +122,7 @@ Ansible is released under the terms of the GPLv3 License.
122 122
 SEE ALSO
123 123
 --------
124 124
 
125
-*ansible*(1)
125
+*ansible*(1), *ansible-pull*(1)
126 126
 
127 127
 Extensive documentation as well as IRC and mailing list info
128 128
 is available on the ansible home page: <https://ansible.github.com/>
129 129
new file mode 100644
... ...
@@ -0,0 +1,73 @@
0
+'\" t
1
+.\"     Title: ansible
2
+.\"    Author: [see the "AUTHOR" section]
3
+.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
4
+.\"      Date: 08/14/2012
5
+.\"    Manual: System administration commands
6
+.\"    Source: Ansible 0.7
7
+.\"  Language: English
8
+.\"
9
+.TH "ANSIBLE" "1" "08/14/2012" "Ansible 0\&.7" "System administration commands"
10
+.\" -----------------------------------------------------------------
11
+.\" * Define some portability stuff
12
+.\" -----------------------------------------------------------------
13
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14
+.\" http://bugs.debian.org/507673
15
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
16
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17
+.ie \n(.g .ds Aq \(aq
18
+.el       .ds Aq '
19
+.\" -----------------------------------------------------------------
20
+.\" * set default formatting
21
+.\" -----------------------------------------------------------------
22
+.\" disable hyphenation
23
+.nh
24
+.\" disable justification (adjust text to left margin only)
25
+.ad l
26
+.\" -----------------------------------------------------------------
27
+.\" * MAIN CONTENT STARTS HERE *
28
+.\" -----------------------------------------------------------------
29
+.SH "NAME"
30
+ansible-pull \- set up a remote copy of ansible on each managed node
31
+.SH "SYNOPSIS"
32
+.sp
33
+ansible \-d DEST \-U URL [ \-C CHECKOUT ]
34
+.SH "DESCRIPTION"
35
+.sp
36
+\fBAnsible\fR is an extra\-simple tool/framework/API for doing \*(Aqremote things\*(Aq over SSH\&.
37
+.sp
38
+Use ansible\-pull to set up a remote copy of ansible on each managed node, each set to run via cron and update playbook source via git\&. This inverts the default \fBpush\fR architecture of ansible into a \fBpull\fR architecture, which has near\-limitless scaling potential\&.
39
+.sp
40
+The setup playbook can be tuned to change the cron frequency, logging locations, and parameters to ansible\-pull\&.
41
+.sp
42
+This is useful both for extreme scale\-out as well as periodic remediation\&. Usage of the \fIfetch\fR module to retrieve logs from ansible\-pull runs would be an excellent way to gather and analyze remote logs from ansible\-pull\&.
43
+.SH "OPTIONS"
44
+.PP
45
+\fB\-d\fR \fIDEST\fR, \fB\-\-directory=\fR\fIDEST\fR
46
+.RS 4
47
+Directory to checkout git repository into\&.
48
+.RE
49
+.PP
50
+\fB\-U\fR \fIURL\fR, \fB\-\-url=\fR\fIURL\fR
51
+.RS 4
52
+URL of git repository to clone\&.
53
+.RE
54
+.PP
55
+\fB\-C\fR \fICHECKOUT\fR, \fB\-\-checkout=\fR\fICHECKOUT\fR
56
+.RS 4
57
+Branch/Tag/Commit to checkout\&. Defaults to
58
+\fIHEAD\fR\&.
59
+.RE
60
+.SH "AUTHOR"
61
+.sp
62
+Ansible was originally written by Michael DeHaan\&. See the AUTHORS file for a complete list of contributors\&.
63
+.SH "COPYRIGHT"
64
+.sp
65
+Copyright \(co 2012, Michael DeHaan
66
+.sp
67
+Ansible is released under the terms of the GPLv3 License\&.
68
+.SH "SEE ALSO"
69
+.sp
70
+\fBansible\fR(1), \fBansible\-playbook\fR(1)
71
+.sp
72
+Extensive documentation as well as IRC and mailing list info is available on the ansible home page: https://ansible\&.github\&.com/
0 73
new file mode 100644
... ...
@@ -0,0 +1,76 @@
0
+ansible(1)
1
+=========
2
+:doctype:manpage
3
+:man source:   Ansible
4
+:man version:  %VERSION%
5
+:man manual:   System administration commands
6
+
7
+NAME
8
+----
9
+ansible-pull - set up a remote copy of ansible on each managed node
10
+
11
+
12
+SYNOPSIS
13
+--------
14
+ansible -d DEST -U URL [ -C CHECKOUT ]
15
+
16
+
17
+DESCRIPTION
18
+-----------
19
+
20
+*Ansible* is an extra-simple tool/framework/API for doing \'remote things' over
21
+SSH.
22
+
23
+Use ansible-pull to set up a remote copy of ansible on each managed
24
+node, each set to run via cron and update playbook source via
25
+git. This inverts the default *push* architecture of ansible into a
26
+*pull* architecture, which has near-limitless scaling potential.
27
+
28
+The setup playbook can be tuned to change the cron frequency, logging
29
+locations, and parameters to ansible-pull.
30
+
31
+This is useful both for extreme scale-out as well as periodic
32
+remediation. Usage of the 'fetch' module to retrieve logs from
33
+ansible-pull runs would be an excellent way to gather and analyze
34
+remote logs from ansible-pull.
35
+
36
+
37
+OPTIONS
38
+-------
39
+
40
+*-d* 'DEST', *--directory=*'DEST'::
41
+
42
+Directory to checkout git repository into.
43
+
44
+*-U* 'URL', *--url=*'URL'::
45
+
46
+URL of git repository to clone.
47
+
48
+*-C* 'CHECKOUT', *--checkout=*'CHECKOUT'::
49
+
50
+Branch/Tag/Commit to checkout.  Defaults to 'HEAD'.
51
+
52
+
53
+
54
+AUTHOR
55
+------
56
+
57
+Ansible was originally written by Michael DeHaan. See the AUTHORS file
58
+for a complete list of contributors.
59
+
60
+
61
+COPYRIGHT
62
+---------
63
+
64
+Copyright © 2012, Michael DeHaan
65
+
66
+Ansible is released under the terms of the GPLv3 License.
67
+
68
+
69
+SEE ALSO
70
+--------
71
+
72
+*ansible*(1), *ansible-playbook*(1)
73
+
74
+Extensive documentation as well as IRC and mailing list info
75
+is available on the ansible home page: <https://ansible.github.com/>
... ...
@@ -1,13 +1,22 @@
1 1
 '\" t
2 2
 .\"     Title: ansible
3 3
 .\"    Author: [see the "AUTHOR" section]
4
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
5
-.\"      Date: 08/06/2012
4
+.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
5
+.\"      Date: 08/14/2012
6 6
 .\"    Manual: System administration commands
7 7
 .\"    Source: Ansible 0.7
8 8
 .\"  Language: English
9 9
 .\"
10
-.TH "ANSIBLE" "1" "08/06/2012" "Ansible 0\&.7" "System administration commands"
10
+.TH "ANSIBLE" "1" "08/14/2012" "Ansible 0\&.7" "System administration commands"
11
+.\" -----------------------------------------------------------------
12
+.\" * Define some portability stuff
13
+.\" -----------------------------------------------------------------
14
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
+.\" http://bugs.debian.org/507673
16
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
+.ie \n(.g .ds Aq \(aq
19
+.el       .ds Aq '
11 20
 .\" -----------------------------------------------------------------
12 21
 .\" * set default formatting
13 22
 .\" -----------------------------------------------------------------
... ...
@@ -25,7 +34,7 @@ ansible \- run a command somewhere else
25 25
 ansible <host\-pattern> [\-f forks] [\-m module_name] [\-a args]
26 26
 .SH "DESCRIPTION"
27 27
 .sp
28
-\fBAnsible\fR is an extra\-simple tool/framework/API for doing \'remote things\' over SSH\&.
28
+\fBAnsible\fR is an extra\-simple tool/framework/API for doing \*(Aqremote things\*(Aq over SSH\&.
29 29
 .SH "ARGUMENTS"
30 30
 .PP
31 31
 \fBhost\-pattern\fR
... ...
@@ -49,6 +58,11 @@ Level of parallelism\&.
49 49
 is specified as an integer, the default is 5\&.
50 50
 .RE
51 51
 .PP
52
+\fB\-\-private\-key=\fR\fIPRIVATE_KEY_FILE\fR
53
+.RS 4
54
+Use this file to authenticate the connection\&.
55
+.RE
56
+.PP
52 57
 \fB\-m\fR \fINAME\fR, \fB\-\-module\-name=\fR\fINAME\fR
53 58
 .RS 4
54 59
 Execute the module called
... ...
@@ -63,7 +77,7 @@ to load modules from\&. The default is
63 63
 \fI/usr/share/ansible\fR\&.
64 64
 .RE
65 65
 .PP
66
-\fB\-a\fR \'\fIARGUMENTS\fR\', \fB\-\-args=\fR\'\fIARGUMENTS\fR\'
66
+\fB\-a\fR \*(Aq\fIARGUMENTS\fR\*(Aq, \fB\-\-args=\fR\*(Aq\fIARGUMENTS\fR\*(Aq
67 67
 .RS 4
68 68
 The
69 69
 \fIARGUMENTS\fR
... ...
@@ -131,12 +145,20 @@ Sudo to
131 131
 instead of root\&. Implies \-\-sudo\&.
132 132
 .RE
133 133
 .PP
134
+\fB\-\-private\-key=\fR\fIPRIVATE_KEY_FILE\fR
135
+.RS 4
136
+Use this file to authenticate the connection\&.
137
+.RE
138
+.PP
134 139
 \fB\-c\fR \fICONNECTION\fR, \fB\-\-connection=\fR\fICONNECTION\fR
135 140
 .RS 4
136 141
 Connection type to use\&. Possible options are
137 142
 \fIparamiko\fR
138
-(SSH) and
139
-\fIlocal\fR\&. Local is mostly useful for crontab or kickstarts\&.
143
+(SSH),
144
+\fIssh\fR, and
145
+\fIlocal\fR\&.
146
+\fIlocal\fR
147
+is mostly useful for crontab or kickstarts\&.
140 148
 .RE
141 149
 .SH "INVENTORY"
142 150
 .sp
... ...
@@ -165,6 +187,6 @@ Copyright \(co 2012, Michael DeHaan
165 165
 Ansible is released under the terms of the GPLv3 License\&.
166 166
 .SH "SEE ALSO"
167 167
 .sp
168
-\fBansible\-playbook\fR(1)
168
+\fBansible\-playbook\fR(1), \fBansible\-pull\fR(1)
169 169
 .sp
170 170
 Extensive documentation as well as IRC and mailing list info is available on the ansible home page: https://ansible\&.github\&.com/
... ...
@@ -160,7 +160,7 @@ Ansible is released under the terms of the GPLv3 License.
160 160
 SEE ALSO
161 161
 --------
162 162
 
163
-*ansible-playbook*(1)
163
+*ansible-playbook*(1), *ansible-pull*(1)
164 164
 
165 165
 Extensive documentation as well as IRC and mailing list info
166 166
 is available on the ansible home page: <https://ansible.github.com/>
... ...
@@ -56,7 +56,7 @@ rm -rf $RPM_BUILD_ROOT
56 56
 %config(noreplace) %{_sysconfdir}/ansible
57 57
 %doc README.md PKG-INFO COPYING
58 58
 %doc %{_mandir}/man1/ansible*
59
-
59
+%doc examples/playbooks
60 60
 
61 61
 %changelog
62 62
 * Mon Aug 6 2012 Michael DeHaan <michael.dehaan@gmail.com> - 0.7-0