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`` -------------------------------------------