Q:

Ansible parses my YML comment and mistake it with k=v

In this code block running ansible 2.9.6: 
// System/group_vars/all/vars.yml
---

# AWS S3
# User Ansible
# Permissions put/get on arn:aws:s3:::snap/backup-db/*
# Plus d'infos: https://console.aws.amazon.com/iam/home?region=eu-west-2#/users/ansible?section=permissions
s3_access_key: {{ lookup('aws_ssm', '/iam/ansible/access-key', region='eu-west-2', aws_access_key=aws_access_key, aws_secret_key=aws_secret_key) }}

Gives the following error:
ERROR! Syntax Error while loading YAML.
  found unacceptable key (unhashable type: 'AnsibleMapping')

The error appears to be in 'System/group_vars/all/vars.yml': line 32, column 63, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

# Plus d'infos: https://console.aws.amazon.com/iam/home?region=eu-west-2
                                                              ^ here

There appears to be both 'k=v' shorthand syntax and YAML in this task. Only one syntax may be used.
We could be wrong, but this one looks like it might be an issue with
missing quotes. Always quote template expression brackets when they
start a value. For instance:

    with_items:
      - {{ foo }}

Should be written as:

    with_items:
      - "{{ foo }}"

It thinks that region=eu-west-2 is a key value that is mixed with YML syntax.
What can I do to avoid Ansible throwing this wrongful error since it's in a YML comment ?
Thank you :)

A:

It was a stupid mistake caused by a line right after this one:
# Plus d'infos: https://console.aws.amazon.com/iam/home?region=eu-west-2#/users/ansible?section=permissions
s3_access_key: {{ lookup('aws_ssm', '/iam/ansible/access-key', region='eu-west-2', aws_access_key=aws_access_key, aws_secret_key=aws_secret_key) }}

Should be:
# Plus d'infos: https://console.aws.amazon.com/iam/home?region=eu-west-2#/users/ansible?section=permissions
s3_access_key: "{{ lookup('aws_ssm', '/iam/ansible/access-key', region='eu-west-2', aws_access_key=aws_access_key, aws_secret_key=aws_secret_key) }}"

note the quotes around the "{{ lookup }}". The error message was trying to tell me so at the very last part of the error ("might be an issue with
missing quotes") I just was focused on why my comment was parsed and interpreted as key=value

