summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorSandra McCann <samccann@redhat.com>2021-05-14 12:16:46 -0400
committerGitHub <noreply@github.com>2021-05-14 11:16:46 -0500
commit83c5e57ce5d0975458f9ac8e9ab1560b6b805310 (patch)
treec2733b93bd162839c67b19c1a3019687cb5532c9 /docs
parent383559f8afb2c68722913a5975e4b82e1190ea60 (diff)
downloadansible-83c5e57ce5d0975458f9ac8e9ab1560b6b805310.tar.gz
Backportapalooza5 (#74706)
* Jinja intersphinx should point at 3.0; other updates (cherry picked from commit 8c34eaa69f22737ac113ffed7ae359af259d9395) * Update AWS guides with new SDK and Python requirements (#74585) The 2.0 collection releases will introduce new Python requirements and a new SDK support policy (cherry picked from commit fa15d35cb1ea25416db9c6a788c35214f640fe54) * Add JC filter plugin example (#74563) Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com> (cherry picked from commit 91212b2008f3f75e855fd9e74194c05e7a6acd50) * Fix typo on roles documentation (#74696) ##### SUMMARY Small fix on the roles directory structure documentation ##### ISSUE TYPE - Docs Pull Request +label: docsite_pr (cherry picked from commit 25de07946c40e10a6213a5af03348dca2f84a699) * intro: Add a note about current user (#74638) Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> (cherry picked from commit 39df263f1aff9ee4e9b1073499cdffb6651d8633) Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com> Co-authored-by: Jill R <4121322+jillr@users.noreply.github.com> Co-authored-by: Kelly Brazil <kellyjonbrazil@gmail.com> Co-authored-by: m0nt3cr1st0 <gonzalo.rubio.casas@gmail.com> Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/docsite/ansible_2_10.invbin238312 -> 239714 bytes
-rw-r--r--docs/docsite/ansible_2_8.invbin198635 -> 198655 bytes
-rw-r--r--docs/docsite/ansible_3.invbin270615 -> 273672 bytes
-rw-r--r--docs/docsite/jinja2.invbin3278 -> 3605 bytes
-rw-r--r--docs/docsite/python3.invbin109561 -> 109566 bytes
-rw-r--r--docs/docsite/rst/dev_guide/platforms/aws_guidelines.rst43
-rw-r--r--docs/docsite/rst/network/user_guide/cli_parsing.rst25
-rw-r--r--docs/docsite/rst/scenario_guides/guide_aws.rst5
-rw-r--r--docs/docsite/rst/user_guide/intro_getting_started.rst2
-rw-r--r--docs/docsite/rst/user_guide/playbooks_reuse_roles.rst2
10 files changed, 74 insertions, 3 deletions
diff --git a/docs/docsite/ansible_2_10.inv b/docs/docsite/ansible_2_10.inv
index 716035a401..e646e94f23 100644
--- a/docs/docsite/ansible_2_10.inv
+++ b/docs/docsite/ansible_2_10.inv
Binary files differ
diff --git a/docs/docsite/ansible_2_8.inv b/docs/docsite/ansible_2_8.inv
index 923d15f4a8..90486f6e12 100644
--- a/docs/docsite/ansible_2_8.inv
+++ b/docs/docsite/ansible_2_8.inv
Binary files differ
diff --git a/docs/docsite/ansible_3.inv b/docs/docsite/ansible_3.inv
index 8385568201..99cd359227 100644
--- a/docs/docsite/ansible_3.inv
+++ b/docs/docsite/ansible_3.inv
Binary files differ
diff --git a/docs/docsite/jinja2.inv b/docs/docsite/jinja2.inv
index 552a9584f8..a5341c64eb 100644
--- a/docs/docsite/jinja2.inv
+++ b/docs/docsite/jinja2.inv
Binary files differ
diff --git a/docs/docsite/python3.inv b/docs/docsite/python3.inv
index 1a4fb5ff36..0a54e01716 100644
--- a/docs/docsite/python3.inv
+++ b/docs/docsite/python3.inv
Binary files differ
diff --git a/docs/docsite/rst/dev_guide/platforms/aws_guidelines.rst b/docs/docsite/rst/dev_guide/platforms/aws_guidelines.rst
index 8d02c64eb4..b5263274ca 100644
--- a/docs/docsite/rst/dev_guide/platforms/aws_guidelines.rst
+++ b/docs/docsite/rst/dev_guide/platforms/aws_guidelines.rst
@@ -9,6 +9,47 @@ The Ansible AWS collection (on `Galaxy <https://galaxy.ansible.com/community/aws
.. contents::
:local:
+Requirements
+============
+
+Python Compatibility
+--------------------
+
+AWS content in Ansible 2.9 and 1.x collection releases supported Python 2.7 and newer.
+
+Starting with the 2.0 releases of both collections, Python 2.7 support will be ended in accordance with AWS' `end of Python 2.7 support <https://aws.amazon.com/blogs/developer/announcing-end-of-support-for-python-2-7-in-aws-sdk-for-python-and-aws-cli-v1/>`_. Contributions to both collections that target the 2.0 or later collection releases can be written to support Python 3.6+ syntax.
+
+SDK Version Support
+-------------------
+
+Starting with the 2.0 releases of both collections, it is generally the policy to support the versions of botocore and boto3 that were released 12 months prior to the most recent major collection release, following semantic versioning (for example, 2.0.0, 3.0.0).
+
+Features and functionality that require newer versions of the SDK can be contributed provided they are noted in the module documentation:
+
+.. code-block:: yaml
+
+ DOCUMENTATION = '''
+ ---
+ module: ec2_vol
+ options:
+ throughput:
+ description:
+ - Volume throughput in MB/s.
+ - This parameter is only valid for gp3 volumes.
+ - Valid range is from 125 to 1000.
+ - Requires at least botocore version 1.19.27.
+ type: int
+ version_added: 1.4.0
+
+And handled using the ``botocore_at_least`` helper method:
+
+.. code-block:: python
+
+ if module.params.get('throughput'):
+ if not module.botocore_at_least("1.19.27"):
+ module.fail_json(msg="botocore >= 1.19.27 is required to set the throughput for a volume")
+
+
Maintaining existing modules
============================
@@ -154,7 +195,7 @@ Supporting Module Defaults
The existing AWS modules support using :ref:`module_defaults <module_defaults>` for common
authentication parameters. To do the same for your new module, add an entry for it in
-``lib/ansible/config/module_defaults.yml``. These entries take the form of:
+``meta/runtime.yml``. These entries take the form of:
.. code-block:: yaml
diff --git a/docs/docsite/rst/network/user_guide/cli_parsing.rst b/docs/docsite/rst/network/user_guide/cli_parsing.rst
index aa50892b7d..605759fd0b 100644
--- a/docs/docsite/rst/network/user_guide/cli_parsing.rst
+++ b/docs/docsite/rst/network/user_guide/cli_parsing.rst
@@ -56,6 +56,8 @@ The ``cli_parse`` module includes the following cli_parsing plugins:
A library for semi-structured text parsing using templates, with added capabilities to simplify the process
``pyats``
Uses the parsers included with the Cisco Test Automation & Validation Solution
+``jc``
+ A python module that converts the output of dozens of popular Linux/UNIX/macOS/Windows commands and file types to python dictionaries or lists of dictionaries. Note: this filter plugin can be found in the ``community.general`` collection.
``json``
Converts JSON output at the CLI to an Ansible native data structure
@@ -583,6 +585,29 @@ The task sets the follow fact as the ``interfaces`` fact for the host:
state: up
+Parsing with JC
+-----------------
+
+JC is a python library that converts the output of dozens of common Linux/UNIX/macOS/Windows command-line tools and file types to python dictionaries or lists of dictionaries for easier parsing. JC is available as a filter plugin in the ``community.general`` collection.
+
+The following is an example using JC to parse the output of the ``dig`` command:
+
+.. code-block:: yaml
+
+ - name: "Run dig command and parse with jc"
+ hosts: ubuntu
+ tasks:
+ - shell: dig example.com
+ register: result
+ - set_fact:
+ myvar: "{{ result.stdout | community.general.jc('dig') }}"
+ - debug:
+ msg: "The IP is: {{ myvar[0].answer[0].data }}"
+
+- The JC project and documentation can be found `here <https://github.com/kellyjonbrazil/jc/>`_.
+- See this `blog entry <https://blog.kellybrazil.com/2020/08/30/parsing-command-output-in-ansible-with-jc/>`_ for more information.
+
+
Converting XML
-----------------
diff --git a/docs/docsite/rst/scenario_guides/guide_aws.rst b/docs/docsite/rst/scenario_guides/guide_aws.rst
index ba453195df..3b5f1f4fb8 100644
--- a/docs/docsite/rst/scenario_guides/guide_aws.rst
+++ b/docs/docsite/rst/scenario_guides/guide_aws.rst
@@ -11,7 +11,10 @@ section is to explain how to put Ansible modules together (and use inventory scr
Requirements for the AWS modules are minimal.
-All of the modules require and are tested against recent versions of boto, usually boto3. Check the module documentation for the minimum required version for each module. You must have the boto3 Python module installed on your control machine. You may also need the original boto package. You can install these modules from your OS distribution or using the python package installer: ``pip install boto3``.
+All of the modules require and are tested against recent versions of botocore and boto3. Starting with the 2.0 AWS collection releases, it is generally the policy of the collections to support the versions of these libraries released 12 months prior to the most recent major collection revision. Individual modules may require a more recent library version to support specific features or may require the boto library, check the module documentation for the minimum required version for each module. You must have the boto3 Python module installed on your control machine. You can install these modules from your OS distribution or using the python package installer: ``pip install boto3``.
+
+Starting with the 2.0 releases of both collections, Python 2.7 support will be ended in accordance with AWS' `end of Python 2.7 support <https://aws.amazon.com/blogs/developer/announcing-end-of-support-for-python-2-7-in-aws-sdk-for-python-and-aws-cli-v1/>`_ and Python 3.6 or greater will be required.
+
Whereas classically Ansible will execute tasks in its host loop against multiple remote machines, most cloud-control steps occur on your local machine with reference to the regions to control.
diff --git a/docs/docsite/rst/user_guide/intro_getting_started.rst b/docs/docsite/rst/user_guide/intro_getting_started.rst
index 782a79fa8b..6812feea5c 100644
--- a/docs/docsite/rst/user_guide/intro_getting_started.rst
+++ b/docs/docsite/rst/user_guide/intro_getting_started.rst
@@ -81,6 +81,8 @@ You should see output for each host in your inventory, similar to this:
"ping": "pong"
}
+You can use ``-u`` as one way to specify the user to connect as, by default Ansible uses SSH, which defaults to the 'current user'.
+
Now run a live command on all of your nodes:
.. code-block:: bash
diff --git a/docs/docsite/rst/user_guide/playbooks_reuse_roles.rst b/docs/docsite/rst/user_guide/playbooks_reuse_roles.rst
index 8a860e4e09..f45c2ed4af 100644
--- a/docs/docsite/rst/user_guide/playbooks_reuse_roles.rst
+++ b/docs/docsite/rst/user_guide/playbooks_reuse_roles.rst
@@ -12,7 +12,7 @@ Roles let you automatically load related vars, files, tasks, handlers, and other
Role directory structure
========================
-An Ansible role has a defined directory structure with seven main standard directories. You must include at least one of these directories in each role. You can omit any directories the role does not use. For example:
+An Ansible role has a defined directory structure with eight main standard directories. You must include at least one of these directories in each role. You can omit any directories the role does not use. For example:
.. code-block:: text