Limit sphinx version on python 2.6. (#24678)

* Limit sphinx version on python 2.6.
* Fix issues identified by rstcheck.

(cherry picked from commit 9178e176b5)
pull/24764/head
Matt Clay 8 years ago
parent 7e605f4e84
commit 3a6fd9448e

@ -41,7 +41,7 @@ For more information about action plugins, go `here <https://docs.ansible.com/an
3. Should you use a role instead?
Check out the roles documentation `here <http://docs.ansible.com/ansible/playbooks_roles.html#roles>`_.
Check out the `roles documentation <http://docs.ansible.com/ansible/playbooks_roles.html#roles>`_.
.. _developing_modules_all:

@ -219,7 +219,7 @@ RETURN Block
The RETURN section documents what the module returns, and is required for all new modules.
For each value returned, provide a ``description``, in what circumstances the value is ``returned``,
the ``type`` of the value and a ``sample``. For example, from the ``copy`` module::
the ``type`` of the value and a ``sample``. For example, from the ``copy`` module:
The following fields can be used and are all required unless specified otherwise.

@ -33,9 +33,9 @@ Ok, let's get going with an example. We'll use Python. For starters, save this
import json
date = str(datetime.datetime.now())
print json.dumps({
print(json.dumps({
"time" : date
})
}))
.. _module_testing:
@ -146,10 +146,10 @@ a lot shorter than this:
# can be added.
if rc != 0:
print json.dumps({
print(json.dumps({
"failed" : True,
"msg" : "failed setting the time"
})
}))
sys.exit(1)
# when things do not fail, we do not
@ -160,10 +160,10 @@ a lot shorter than this:
# notifiers to be used in playbooks.
date = str(datetime.datetime.now())
print json.dumps({
print(json.dumps({
"time" : date,
"changed" : True
})
}))
sys.exit(0)
# if no parameters are sent, the module may or
@ -171,9 +171,9 @@ a lot shorter than this:
# return the time
date = str(datetime.datetime.now())
print json.dumps({
print(json.dumps({
"time" : date
})
}))
Let's test that module::

@ -84,6 +84,7 @@ Callback plugins are created by creating a new class with the Base(Callbacks) cl
from ansible import constants as C
class CallbackModule(CallbackBase):
pass
From there, override the specific methods from the CallbackBase that you want to provide a callback for. For plugins intended for use with Ansible version 2.0 and later, you should only override methods that start with `v2`. For a complete list of methods that you can override, please see ``__init__.py`` in the `lib/ansible/plugins/callback <https://github.com/ansible/ansible/tree/devel/lib/ansible/plugins/callback>`_ directory.

@ -1,3 +1,4 @@
coverage >= 4.2, != 4.3.2 # features in 4.2+ required, avoid known bug in 4.3.2 on python 2.6
pywinrm >= 0.2.1 # 0.1.1 required, but 0.2.1 provides better performance
pylint >= 1.5.3, < 1.7.0 # 1.4.1 adds JSON output, but 1.5.3 fixes bugs related to JSON output
sphinx < 1.6 ; python_version < '2.7' # sphinx 1.6 and later require python 2.7 or later

Loading…
Cancel
Save