From c50da48049cf0d138ee2278c5ac2602fd09f2627 Mon Sep 17 00:00:00 2001 From: John R Barker Date: Wed, 20 Dec 2017 15:20:05 +0000 Subject: [PATCH] Fix various RST warnings (#34084) * Fix various RST warnings * shorter lines --- docs/bin/dump_keywords.py | 2 +- .../developing_modules_in_groups.rst | 2 +- docs/templates/config.rst.j2 | 27 ++++++++++--------- .../modules/cloud/amazon/data_pipeline.py | 11 +++----- lib/ansible/plugins/lookup/redis.py | 1 - 5 files changed, 20 insertions(+), 23 deletions(-) diff --git a/docs/bin/dump_keywords.py b/docs/bin/dump_keywords.py index 339901d5db8..455fc120864 100755 --- a/docs/bin/dump_keywords.py +++ b/docs/bin/dump_keywords.py @@ -52,7 +52,7 @@ for aclass in class_list: # loop is really with_ for users if name == 'Task': - oblist[name]['with_'] = 'DEPRECATED: use ``loop`` instead, with_ used to be how loops were defined, ' + oblist[name]['with_'] = 'DEPRECATED: use ``loop`` instead, ``with_`` used to be how loops were defined, ' 'it can use any available lookup plugin to generate the item list' # local_action is implicit with action diff --git a/docs/docsite/rst/dev_guide/developing_modules_in_groups.rst b/docs/docsite/rst/dev_guide/developing_modules_in_groups.rst index 5ea904010c1..7a0300da8c4 100644 --- a/docs/docsite/rst/dev_guide/developing_modules_in_groups.rst +++ b/docs/docsite/rst/dev_guide/developing_modules_in_groups.rst @@ -26,7 +26,7 @@ Although it's tempting to get straight into coding, there are a few things to be * Shared code can be placed into ``lib/ansible/module_utils/`` * Shared documentation (for example describing common arguments) can be placed in ``lib/ansible/utils/module_docs_fragments/``. * With great power comes great responsibility: Ansible module maintainers have a duty to help keep modules up to date. As with all successful community projects, module maintainers should keep a watchful eye for reported issues and contributions. -* Although not required, unit and/or integration tests are strongly recommended. Unit tests are especially valuable when external resources (such as cloud or network devices) are required. For more information see :doc:`dev_guide/testing` and the `Testing Working Group `_. +* Although not required, unit and/or integration tests are strongly recommended. Unit tests are especially valuable when external resources (such as cloud or network devices) are required. For more information see :doc:`testing` and the `Testing Working Group `_. * Starting with Ansible 2.4 all :doc:`../list_of_network_modules` MUST have unit tests. diff --git a/docs/templates/config.rst.j2 b/docs/templates/config.rst.j2 index 2fc1d322fe0..0ce84d8ddfb 100644 --- a/docs/templates/config.rst.j2 +++ b/docs/templates/config.rst.j2 @@ -6,9 +6,9 @@ {{name}} {{ '=' * name_len }} -Ansible supports a few ways of providing configuration variables, mainly through environment variables, command line switches and an ini file `ansible.cfg`. +Ansible supports a few ways of providing configuration variables, mainly through environment variables, command line switches and an ini file ``ansible.cfg``. -Starting at Ansible 2.4 the `ansible-config` utility allows users to see all the configuration settings available, their defaults, how to set them and +Starting at Ansible 2.4 the ``ansible-config`` utility allows users to see all the configuration settings available, their defaults, how to set them and where their current value comes from. See :doc:ansible-config for more information. @@ -17,20 +17,21 @@ The configuration file Changes can be made and used in a configuration file which will be searched for in the following order: - * ANSIBLE_CONFIG (environment variable if set) - * ansible.cfg (in the current directory) - * ~/.ansible.cfg (in the home directory) - * /etc/ansible/ansible.cfg + * ``ANSIBLE_CONFIG`` (environment variable if set) + * ``ansible.cfg`` (in the current directory) + * ``~/.ansible.cfg`` (in the home directory) + * ``/etc/ansible/ansible.cfg`` Ansible will process the above list and use the first file found, all others are ignored. -.. note:: Comments - The configuration file is one variant of an INI format. - Both the hash sign ("#") and semicolon (";") are allowed as - comment markers when the comment starts the line. - However, if the comment is inline with regular values, - only the semicolon is allowed to introduce the comment. - For instance:: +.. note:: + + The configuration file is one variant of an INI format. + Both the hash sign (``#``) and semicolon (``;``) are allowed as + comment markers when the comment starts the line. + However, if the comment is inline with regular values, + only the semicolon is allowed to introduce the comment. + For instance:: # some basic default values... inventory = /etc/ansible/hosts ; This points to the file that lists your hosts diff --git a/lib/ansible/modules/cloud/amazon/data_pipeline.py b/lib/ansible/modules/cloud/amazon/data_pipeline.py index 168623cf419..2a5e9c60669 100644 --- a/lib/ansible/modules/cloud/amazon/data_pipeline.py +++ b/lib/ansible/modules/cloud/amazon/data_pipeline.py @@ -24,14 +24,11 @@ extends_documentation_fragment: - aws - ec2 description: - - Create and manage AWS Datapipelines. Creation is not idempotent in AWS, - so the uniqueId is created by hashing the options (minus objects) given to the datapipeline. - - The pipeline definition must be in the format given here + - Create and manage AWS Datapipelines. Creation is not idempotent in AWS, so the I(uniqueId) is created by hashing the options (minus objects) + given to the datapipeline. + - The pipeline definition must be in the format given here U(http://docs.aws.amazon.com/datapipeline/latest/APIReference/API_PutPipelineDefinition.html#API_PutPipelineDefinition_RequestSyntax). - - Also operations will wait for a configurable amount - of time to ensure the pipeline is in the requested state. + - Also operations will wait for a configurable amount of time to ensure the pipeline is in the requested state. options: name: description: diff --git a/lib/ansible/plugins/lookup/redis.py b/lib/ansible/plugins/lookup/redis.py index 5d5a84dee27..b6ef4f28e1b 100644 --- a/lib/ansible/plugins/lookup/redis.py +++ b/lib/ansible/plugins/lookup/redis.py @@ -26,7 +26,6 @@ DOCUMENTATION = """ ini: - section: lookup_redis key: host - port: port: description: port on which Redis is listening on default: 6379A