From e823f8905bd8da93253e7535a451948c9472b73f Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Thu, 1 Dec 2022 01:27:04 -0800 Subject: [PATCH] Add documentation for the use of strings with compose (#1283) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add documentation for the use of strings with compose SUMMARY Documentation for the use of strings with compose is documented in https://docs.ansible.com/ansible/latest/plugins/inventory.html#using-inventory-plugins. However, in the module, it is not well documented. This documentation and example provides documentation in the module docs. Related to #570 ISSUE TYPE Docs Pull Request COMPONENT NAME aws_ec2 inventory Reviewed-by: Gonéri Le Bouder Reviewed-by: Mark Chappell --- .../1283-aws_ec2_inventory_compose_doc_examples.yml | 2 ++ docs/docsite/rst/aws_ec2_guide.rst | 5 +++++ 2 files changed, 7 insertions(+) create mode 100644 changelogs/fragments/1283-aws_ec2_inventory_compose_doc_examples.yml diff --git a/changelogs/fragments/1283-aws_ec2_inventory_compose_doc_examples.yml b/changelogs/fragments/1283-aws_ec2_inventory_compose_doc_examples.yml new file mode 100644 index 00000000000..05d4167966b --- /dev/null +++ b/changelogs/fragments/1283-aws_ec2_inventory_compose_doc_examples.yml @@ -0,0 +1,2 @@ +trivial: +- Add documentation for using string with compose feature in ec2 dynamic inventory. diff --git a/docs/docsite/rst/aws_ec2_guide.rst b/docs/docsite/rst/aws_ec2_guide.rst index 6ec5cf1ea42..faa8561a927 100644 --- a/docs/docsite/rst/aws_ec2_guide.rst +++ b/docs/docsite/rst/aws_ec2_guide.rst @@ -275,6 +275,11 @@ Some examples are shown below: # This sets the ec2_security_group_ids variable. ec2_security_group_ids: security_groups | map(attribute='group_id') | list | join(',') + # Host variables that are strings need to be wrapped with two sets of quotes. + # See https://docs.ansible.com/ansible/latest/plugins/inventory.html#using-inventory-plugins for details. + ansible_connection: '"community.aws.aws_ssm"' + ansible_user: '"ssm-user"' + ``include_filters`` and ``exclude_filters`` -------------------------------------------