Skip to content

Commit 843fa4e

Browse files
committed
Wording, wrapping, and formatting changes for scenarios/admin.
1 parent 44890a8 commit 843fa4e

File tree

1 file changed

+23
-14
lines changed

1 file changed

+23
-14
lines changed

docs/scenarios/admin.rst

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,12 @@ State files can be written using YAML, the Jinja2 template system or pure Python
126126

127127
Psutil
128128
------
129-
`Psutil <https://code.google.com/p/psutil/>`_ is an interface to different system information (e.g. CPU, memory, disks, network, users and processes).
130129

131-
Here is an example to be aware of some server overload. In case of some failed test (net, CPU) it send an email.
130+
`Psutil <https://code.google.com/p/psutil/>`_ is an interface to different
131+
system information (e.g. CPU, memory, disks, network, users and processes).
132+
133+
Here is an example to be aware of some server overload. If any of the
134+
tests (net, CPU) fail, it will send an email.
132135

133136
.. code-block:: python
134137
@@ -162,7 +165,7 @@ Here is an example to be aware of some server overload. In case of some failed t
162165
if counter > 25:
163166
attack = 0
164167
counter = 0
165-
# Write a very important email if attack is higher then 4
168+
# Write a very important email if attack is higher than 4
166169
TO = "you@your_email.com"
167170
FROM = "webmaster@your_domain.com"
168171
SUBJECT = "Your domain is out of system resources!"
@@ -173,32 +176,38 @@ Here is an example to be aware of some server overload. In case of some failed t
173176
server.quit()
174177
175178
176-
A full terminal application like a widely extended top which is based on psutil and with the ability of a client-server
177-
monitoring is `glance <https://github.com/nicolargo/glances/>`_.
179+
A full terminal application like a widely extended top which is based on
180+
psutil and with the ability of a client-server monitoring is
181+
`glance <https://github.com/nicolargo/glances/>`_.
178182

179183
Ansible
180184
-------
181-
`Ansible <http://ansible.com/>`_ is a open source system automation tool. The biggest advantage over Puppet or Chef is it does not require an agent on the client machine. Playbooks are Ansible’s configuration, deployment, and orchestration language and are written in in yaml with jinja2 for templating.
185+
186+
`Ansible <http://ansible.com/>`_ is an open source system automation tool.
187+
The biggest advantage over Puppet or Chef is it does not require an agent on
188+
the client machine. Playbooks are Ansible’s configuration, deployment, and
189+
orchestration language and are written in in YAML with Jinja2 for templating.
182190

183191
Ansible supports Python versions 2.6 and 2.7 and can be installed via pip:
184192

185193
.. code-block:: console
186194
187195
$ pip install ansible
188196
189-
Ansible requires a inventory file that describes the hosts it has access to. Here is an example of a host and
190-
playbook that will ping all the hosts in the inventory file:
197+
Ansible requires an inventory file that describes the hosts to which it has
198+
access. Below is an example of a host and playbook that will ping all the
199+
hosts in the inventory file.
191200

192201
Here is an example inventory file:
193-
hosts.yml
202+
:file:`hosts.yml`
194203

195204
.. code-block:: yaml
196205
197206
[server_name]
198207
127.0.0.1
199208
200209
Here is an example playbook:
201-
ping.yml
210+
:file:`ping.yml`
202211

203212
.. code-block:: yaml
204213
@@ -207,17 +216,17 @@ ping.yml
207216
208217
tasks:
209218
- name: ping
210-
action: ping
219+
action: ping
211220
212221
To run the playbook:
213222

214223
.. code-block:: console
215224
216225
$ ansible-playbook ping.yml -i hosts.yml --ask-pass
217226
218-
That Ansible playbook will ping all of the servers in the hosts.yml file. You can also select groups of servers using Ansible. For more information about Ansible read the docs.
219-
220-
`Ansible Docs <http://docs.ansible.com/>`_
227+
The Ansible playbook will ping all of the servers in the :file:`hosts.yml` file.
228+
You can also select groups of servers using Ansible. For more information
229+
about Ansible, read the `Ansible Docs <http://docs.ansible.com/>`_.
221230

222231

223232
Chef

0 commit comments

Comments
 (0)