Folks, consider the following playbook:
ec2_facts return variables with name ansible_ec2*.
If you want to see all variables, try to use https://github.com/f500/ansible-dumpall
«{{ ansible_facts.ansible_ec2_ami_id }}» is wrong, use «{{ ansible_ec2_ami_id }}».