elleryq
1/22/2016 - 7:19 AM

Ansible EC2 module result

Ansible EC2 module result

# exact_count: 1
TASK [debug] *******************************************************************
ok: [127.0.0.1] => {
    "ec_aa": {
        "changed": true, 
        "instance_ids": [
            ""
        ], 
        "instances": [
            {
                "private_dns_name": "", 
                "private_ip": "", 
                "public_dns_name": "", 
                "public_ip": "", 
            }
        ], 
        "tagged_instances": [
            {
                "private_dns_name": "", 
                "private_ip": "", 
                "public_dns_name": "", 
                "public_ip": "", 
            }
        ]
    }
}
# exact_count from 2 to 1
# terminated instances will be in instances
# remained instances is still in tagged_instances
TASK [debug] *******************************************************************
ok: [127.0.0.1] => {
    "ec_aa": {
        "changed": true, 
        "instance_ids": [
            ""
        ], 
        "instances": [
            {
                "state": "terminated", 
                "private_dns_name": "", 
                "private_ip": "", 
                "public_dns_name": "", 
                "public_ip": "", 
            }
        ], 
        "tagged_instances": [
            {
                "private_dns_name": "", 
                "private_ip": "", 
                "public_dns_name": "", 
                "public_ip": "", 
           }
        ]
    }
}
# exact_count: 1
# nothing changed, instances will be in tagged_instances
TASK [debug] *******************************************************************
ok: [127.0.0.1] => {
    "ec_aa": {
        "changed": false, 
        "instance_ids": null, 
        "instances": [], 
        "tagged_instances": [
            {
                "private_dns_name": "", 
                "private_ip": "", 
                "public_dns_name": "", 
                "public_ip": "", 
            }
        ]
    }
}