From 063d19048df4ad207d62da03bb8aeb11368880e9 Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Wed, 13 Jun 2018 11:52:42 +0530 Subject: [PATCH] plugins: Doc improvement (#41378) * Typo fixes * Grammer fixes * Option fixes Signed-off-by: Abhijeet Kasurde --- lib/ansible/plugins/lookup/csvfile.py | 2 +- lib/ansible/plugins/lookup/etcd.py | 4 ++-- lib/ansible/plugins/lookup/hiera.py | 2 +- lib/ansible/plugins/lookup/indexed_items.py | 2 +- lib/ansible/plugins/lookup/inventory_hostnames.py | 4 ++-- lib/ansible/plugins/lookup/items.py | 2 +- lib/ansible/plugins/lookup/mongodb.py | 4 ++-- lib/ansible/plugins/lookup/sequence.py | 2 +- lib/ansible/plugins/lookup/shelvefile.py | 15 +++++++-------- lib/ansible/plugins/lookup/together.py | 8 ++++---- lib/ansible/plugins/lookup/vars.py | 2 +- 11 files changed, 23 insertions(+), 24 deletions(-) diff --git a/lib/ansible/plugins/lookup/csvfile.py b/lib/ansible/plugins/lookup/csvfile.py index 8e7a03590ae..0a4298b396d 100644 --- a/lib/ansible/plugins/lookup/csvfile.py +++ b/lib/ansible/plugins/lookup/csvfile.py @@ -30,7 +30,7 @@ DOCUMENTATION = """ default: utf-8 version_added: "2.1" notes: - - The default is for TSV files (tab delimeted) not CSV (comma delimted) ... yes the name is misleading. + - The default is for TSV files (tab delimited) not CSV (comma delimited) ... yes the name is misleading. """ EXAMPLES = """ diff --git a/lib/ansible/plugins/lookup/etcd.py b/lib/ansible/plugins/lookup/etcd.py index fcefb3f744c..3aa77790e16 100644 --- a/lib/ansible/plugins/lookup/etcd.py +++ b/lib/ansible/plugins/lookup/etcd.py @@ -24,7 +24,7 @@ DOCUMENTATION = ''' - Jan-Piet Mens (@jpmens) lookup: etcd version_added: "2.1" - short_description: get info from etcd server + short_description: get info from an etcd server description: - Retrieves data from an etcd server options: @@ -48,7 +48,7 @@ DOCUMENTATION = ''' - name: ANSIBLE_ETCD_VERSION validate_certs: description: - - toggle checking that the ssl ceritificates are valid, you normally only want to turn this off with self-signed certs. + - toggle checking that the ssl certificates are valid, you normally only want to turn this off with self-signed certs. default: True type: boolean ''' diff --git a/lib/ansible/plugins/lookup/hiera.py b/lib/ansible/plugins/lookup/hiera.py index 5469c0cac9f..9f10ba90e1a 100644 --- a/lib/ansible/plugins/lookup/hiera.py +++ b/lib/ansible/plugins/lookup/hiera.py @@ -37,7 +37,7 @@ DOCUMENTATION = ''' ''' EXAMPLES = """ -# All this examples depends on hiera.yml that describes the hierarchy +# All this examples depends on hiera.yml that describes the hierarchy - name: "a value from Hiera 'DB'" debug: msg={{ lookup('hiera', 'foo') }} diff --git a/lib/ansible/plugins/lookup/indexed_items.py b/lib/ansible/plugins/lookup/indexed_items.py index 919dd8267a4..cd25ba15fa6 100644 --- a/lib/ansible/plugins/lookup/indexed_items.py +++ b/lib/ansible/plugins/lookup/indexed_items.py @@ -29,7 +29,7 @@ EXAMPLES = """ RETURN = """ _raw: description: - - list with each item.0 giving you the postiion and item.1 the value + - list with each item.0 giving you the position and item.1 the value type: list """ diff --git a/lib/ansible/plugins/lookup/inventory_hostnames.py b/lib/ansible/plugins/lookup/inventory_hostnames.py index 3ad8de3c625..f04cd8ff326 100644 --- a/lib/ansible/plugins/lookup/inventory_hostnames.py +++ b/lib/ansible/plugins/lookup/inventory_hostnames.py @@ -14,14 +14,14 @@ DOCUMENTATION = """ version_added: "1.3" short_description: list of inventory hosts matching a host pattern description: - - "This lookup understands 'host patterns' as used bye the `hosts:` keyword in plays + - "This lookup understands 'host patterns' as used by the `hosts:` keyword in plays and can return a list of matching hosts from inventory" notes: - this is only worth for 'hostname patterns' it is easier to loop over the group/group_names variables otherwise. """ EXAMPLES = """ -- name: show all the hosts matching the pattern, ie all but the group www +- name: show all the hosts matching the pattern, i.e. all but the group www debug: msg: "{{ item }}" with_inventory_hostnames: diff --git a/lib/ansible/plugins/lookup/items.py b/lib/ansible/plugins/lookup/items.py index 80ec60dce0b..3fa0f07f7e3 100644 --- a/lib/ansible/plugins/lookup/items.py +++ b/lib/ansible/plugins/lookup/items.py @@ -14,7 +14,7 @@ DOCUMENTATION = """ notes: - this is the standard lookup used for loops in most examples - check out the 'flattened' lookup for recursive flattening - - if you dont want flattening nor any other tranformation look at the 'list' lookup. + - if you do not want flattening nor any other transformation look at the 'list' lookup. options: _terms: description: list of items diff --git a/lib/ansible/plugins/lookup/mongodb.py b/lib/ansible/plugins/lookup/mongodb.py index 4fcabc6851b..7f22983a7b8 100644 --- a/lib/ansible/plugins/lookup/mongodb.py +++ b/lib/ansible/plugins/lookup/mongodb.py @@ -54,7 +54,7 @@ DOCUMENTATION = ''' default: "{}" skip: description: - - How many results should be skept + - How many results should be skipped type: integer limit: description: @@ -66,7 +66,7 @@ DOCUMENTATION = ''' type: list default: "[]" notes: - - "Please check https://api.mongodb.org/python/current/api/pymongo/collection.html?highlight=find#pymongo.collection.Collection.find for more detais." + - "Please check https://api.mongodb.org/python/current/api/pymongo/collection.html?highlight=find#pymongo.collection.Collection.find for more details." requirements: - pymongo >= 2.4 (python library) ''' diff --git a/lib/ansible/plugins/lookup/sequence.py b/lib/ansible/plugins/lookup/sequence.py index 18ec8a8e801..cfd3389549e 100644 --- a/lib/ansible/plugins/lookup/sequence.py +++ b/lib/ansible/plugins/lookup/sequence.py @@ -32,7 +32,7 @@ DOCUMENTATION = """ description: increments between sequence numbers, the default is 1 unless the end is less than the start, then it is -1. type: number format: - description: return a string with the generated number formated in + description: return a string with the generated number formatted in """ EXAMPLES = """ diff --git a/lib/ansible/plugins/lookup/shelvefile.py b/lib/ansible/plugins/lookup/shelvefile.py index c19e4d41b6a..68548a3e7c0 100644 --- a/lib/ansible/plugins/lookup/shelvefile.py +++ b/lib/ansible/plugins/lookup/shelvefile.py @@ -11,16 +11,15 @@ DOCUMENTATION = """ short_description: read keys from Python shelve file description: - Read keys from Python shelve file. - optoins: + options: _terms: description: sets of key value pairs of parameters - options: - key: - description: key to query - required: True - file: - description: path to shelve file - required: True + key: + description: key to query + required: True + file: + description: path to shelve file + required: True """ EXAMPLES = """ diff --git a/lib/ansible/plugins/lookup/together.py b/lib/ansible/plugins/lookup/together.py index 1f35b07c471..1234ac6204f 100644 --- a/lib/ansible/plugins/lookup/together.py +++ b/lib/ansible/plugins/lookup/together.py @@ -5,14 +5,14 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = """ - lookup: toghether + lookup: together author: Bradley Young version_added: '1.3' - short_description: merges lists into syncronized list + short_description: merges lists into synchronized list description: - Creates a list with the iterated elements of the supplied lists - "To clarify with an example, [ 'a', 'b' ] and [ 1, 2 ] turn into [ ('a',1), ('b', 2) ]" - - This is basicaly the same as the 'zip_longest' filter and Python function + - This is basically the same as the 'zip_longest' filter and Python function - Any 'unbalanced' elements will be substituted with 'None' options: _terms: @@ -31,7 +31,7 @@ EXAMPLES = """ RETURN = """ _list: - description: syncronized list + description: synchronized list """ from ansible.errors import AnsibleError from ansible.module_utils.six.moves import zip_longest diff --git a/lib/ansible/plugins/lookup/vars.py b/lib/ansible/plugins/lookup/vars.py index c238cf57219..65a9ccaffbc 100644 --- a/lib/ansible/plugins/lookup/vars.py +++ b/lib/ansible/plugins/lookup/vars.py @@ -54,7 +54,7 @@ EXAMPLES = """ RETURN = """ _value: description: - - valueof the variables requested. + - value of the variables requested. """ from ansible.errors import AnsibleError, AnsibleUndefinedVariable