I just recently updated to 2.3.1.0. I've used set_fact before the upgrade 
to set my AWS instance ID to a variable "coreaid". 


- name: Save instance ID to coreaid
  set_fact:
    coreaid: "{{ ec2_asg.instances }}"

- debug: msg="the id= {{ coreaid }}"


- name: Set the instance public IP to a variable
  register: instance_public_ip
  shell: sudo aws ec2 describe-instances --filters "Name=instance-id,Values='{{ 
coreaid }}'" --query 'Reservations[*].Instances[*].[PublicIpAddress]' --output 
text



I set the fact, and it's correct:

ok: [local] => {

    "ansible_facts": {

        "coreaid": [

            "i-XXXXX"

When I debug or use it later in the play the value is:

ok: [local] => {

    "msg": "the id= [u'i-XXX']"

What am I doing that is causing the "[u' to be added to the beginning of 
the instance ID?

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/c9945dc0-8b5a-4a79-a843-78d69ab9b0ae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to