Skip to content

Instantly share code, notes, and snippets.

@dyasny
Created February 9, 2016 16:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dyasny/67c97fb60d7beb81f768 to your computer and use it in GitHub Desktop.
Save dyasny/67c97fb60d7beb81f768 to your computer and use it in GitHub Desktop.
output
TASK [Create a public network] *************************************************
task path: /home/stack/ansible-populate-openstack/test.yml:92
ESTABLISH LOCAL CONNECTION FOR USER: stack
127.0.0.1 EXEC ( umask 22 && mkdir -p "$( echo $HOME/.ansible/tmp/ansible-tmp-1455033355.19-231013951800143 )" && echo "$( echo $HOME/.ansible/tmp/ansible-tmp-1455033355.19-231013951800143 )" )
127.0.0.1 PUT /tmp/tmpWXBdAp TO /home/stack/.ansible/tmp/ansible-tmp-1455033355.19-231013951800143/os_network
127.0.0.1 EXEC LANG=en_US.utf8 LC_ALL=en_US.utf8 LC_MESSAGES=en_US.utf8 /usr/bin/python /home/stack/.ansible/tmp/ansible-tmp-1455033355.19-231013951800143/os_network; rm -rf "/home/stack/.ansible/tmp/ansible-tmp-1455033355.19-231013951800143/" > /dev/null 2>&1
changed: [localhost] => {"changed": true, "id": "099c0071-5931-4c4c-841e-f46367c9d594", "invocation": {"module_args": {"admin_state_up": true, "api_timeout": null, "auth": null, "auth_type": null, "availability_zone": null, "cacert": null, "cert": null, "cloud": null, "endpoint_type": "public", "external": true, "key": null, "name": "public", "region_name": null, "shared": false, "state": "present", "timeout": 180, "verify": true, "wait": true}, "module_name": "os_network"}, "network": {"admin_state_up": true, "id": "099c0071-5931-4c4c-841e-f46367c9d594", "mtu": 0, "name": "public", "provider:network_type": "gre", "provider:physical_network": null, "provider:segmentation_id": 25, "router:external": true, "shared": false, "status": "ACTIVE", "subnets": [], "tenant_id": "b491d28d4d07415283935fa45d760d4b"}}
TASK [Create a public subnet] **************************************************
task path: /home/stack/ansible-populate-openstack/test.yml:99
ESTABLISH LOCAL CONNECTION FOR USER: stack
127.0.0.1 EXEC ( umask 22 && mkdir -p "$( echo $HOME/.ansible/tmp/ansible-tmp-1455033356.55-249415514756024 )" && echo "$( echo $HOME/.ansible/tmp/ansible-tmp-1455033356.55-249415514756024 )" )
127.0.0.1 PUT /tmp/tmpPMJo1m TO /home/stack/.ansible/tmp/ansible-tmp-1455033356.55-249415514756024/os_subnet
127.0.0.1 EXEC LANG=en_US.utf8 LC_ALL=en_US.utf8 LC_MESSAGES=en_US.utf8 /usr/bin/python /home/stack/.ansible/tmp/ansible-tmp-1455033356.55-249415514756024/os_subnet; rm -rf "/home/stack/.ansible/tmp/ansible-tmp-1455033356.55-249415514756024/" > /dev/null 2>&1
changed: [localhost] => {"changed": true, "id": "1a8bba1a-e301-4820-bdc8-5f02fef274b5", "invocation": {"module_args": {"allocation_pool_end": "192.168.200.150", "allocation_pool_start": "192.168.200.100", "api_timeout": null, "auth": null, "auth_type": null, "availability_zone": null, "cacert": null, "cert": null, "cidr": "192.168.200.0/24", "cloud": null, "dns_nameservers": ["10.11.5.19", "8.8.8.8"], "enable_dhcp": true, "endpoint_type": "public", "gateway_ip": null, "host_routes": [{"destination": "0.0.0.0/0", "nexthop": "192.168.200.1"}], "ip_version": "4", "ipv6_address_mode": null, "ipv6_ra_mode": null, "key": null, "name": "public", "network_name": "public", "region_name": null, "state": "present", "timeout": 180, "verify": true, "wait": true}, "module_name": "os_subnet"}, "subnet": {"allocation_pools": [{"end": "192.168.200.150", "start": "192.168.200.100"}], "cidr": "192.168.200.0/24", "dns_nameservers": ["10.11.5.19", "8.8.8.8"], "enable_dhcp": true, "gateway_ip": "192.168.200.1", "host_routes": [{"destination": "0.0.0.0/0", "nexthop": "192.168.200.1"}], "id": "1a8bba1a-e301-4820-bdc8-5f02fef274b5", "ip_version": 4, "ipv6_address_mode": null, "ipv6_ra_mode": null, "name": "public", "network_id": "099c0071-5931-4c4c-841e-f46367c9d594", "subnetpool_id": null, "tenant_id": "b491d28d4d07415283935fa45d760d4b"}}
TASK [Create a demo network] ***************************************************
task path: /home/stack/ansible-populate-openstack/test.yml:114
ESTABLISH LOCAL CONNECTION FOR USER: stack
127.0.0.1 EXEC ( umask 22 && mkdir -p "$( echo $HOME/.ansible/tmp/ansible-tmp-1455033358.2-1136145250870 )" && echo "$( echo $HOME/.ansible/tmp/ansible-tmp-1455033358.2-1136145250870 )" )
127.0.0.1 PUT /tmp/tmp7qv9jP TO /home/stack/.ansible/tmp/ansible-tmp-1455033358.2-1136145250870/os_network
127.0.0.1 EXEC LANG=en_US.utf8 LC_ALL=en_US.utf8 LC_MESSAGES=en_US.utf8 /usr/bin/python /home/stack/.ansible/tmp/ansible-tmp-1455033358.2-1136145250870/os_network; rm -rf "/home/stack/.ansible/tmp/ansible-tmp-1455033358.2-1136145250870/" > /dev/null 2>&1
changed: [localhost] => {"changed": true, "id": "52edfae5-0eea-4acb-b95b-7547ee401b80", "invocation": {"module_args": {"admin_state_up": true, "api_timeout": null, "auth": null, "auth_type": null, "availability_zone": null, "cacert": null, "cert": null, "cloud": null, "endpoint_type": "public", "external": false, "key": null, "name": "demo-net", "region_name": null, "shared": false, "state": "present", "timeout": 180, "verify": true, "wait": true}, "module_name": "os_network"}, "network": {"admin_state_up": true, "id": "52edfae5-0eea-4acb-b95b-7547ee401b80", "mtu": 0, "name": "demo-net", "provider:network_type": "gre", "provider:physical_network": null, "provider:segmentation_id": 27, "router:external": false, "shared": false, "status": "ACTIVE", "subnets": [], "tenant_id": "b491d28d4d07415283935fa45d760d4b"}}
TASK [Create a demo subnet] ****************************************************
task path: /home/stack/ansible-populate-openstack/test.yml:120
ESTABLISH LOCAL CONNECTION FOR USER: stack
127.0.0.1 EXEC ( umask 22 && mkdir -p "$( echo $HOME/.ansible/tmp/ansible-tmp-1455033359.77-72958297417778 )" && echo "$( echo $HOME/.ansible/tmp/ansible-tmp-1455033359.77-72958297417778 )" )
127.0.0.1 PUT /tmp/tmpZswKNi TO /home/stack/.ansible/tmp/ansible-tmp-1455033359.77-72958297417778/os_subnet
127.0.0.1 EXEC LANG=en_US.utf8 LC_ALL=en_US.utf8 LC_MESSAGES=en_US.utf8 /usr/bin/python /home/stack/.ansible/tmp/ansible-tmp-1455033359.77-72958297417778/os_subnet; rm -rf "/home/stack/.ansible/tmp/ansible-tmp-1455033359.77-72958297417778/" > /dev/null 2>&1
changed: [localhost] => {"changed": true, "id": "cf62c705-d96b-4f99-8c3e-3768a11a8d0a", "invocation": {"module_args": {"allocation_pool_end": "192.168.150.150", "allocation_pool_start": "192.168.150.100", "api_timeout": null, "auth": null, "auth_type": null, "availability_zone": null, "cacert": null, "cert": null, "cidr": "192.168.150.0/24", "cloud": null, "dns_nameservers": ["10.11.5.19", "8.8.8.8"], "enable_dhcp": true, "endpoint_type": "public", "gateway_ip": null, "host_routes": null, "ip_version": "4", "ipv6_address_mode": null, "ipv6_ra_mode": null, "key": null, "name": "demo-subnet", "network_name": "demo-net", "region_name": null, "state": "present", "timeout": 180, "verify": true, "wait": true}, "module_name": "os_subnet"}, "subnet": {"allocation_pools": [{"end": "192.168.150.150", "start": "192.168.150.100"}], "cidr": "192.168.150.0/24", "dns_nameservers": ["10.11.5.19", "8.8.8.8"], "enable_dhcp": true, "gateway_ip": "192.168.150.1", "host_routes": [], "id": "cf62c705-d96b-4f99-8c3e-3768a11a8d0a", "ip_version": 4, "ipv6_address_mode": null, "ipv6_ra_mode": null, "name": "demo-subnet", "network_id": "52edfae5-0eea-4acb-b95b-7547ee401b80", "subnetpool_id": null, "tenant_id": "b491d28d4d07415283935fa45d760d4b"}}
TASK [Create a demo router] ****************************************************
task path: /home/stack/ansible-populate-openstack/test.yml:132
ESTABLISH LOCAL CONNECTION FOR USER: stack
127.0.0.1 EXEC ( umask 22 && mkdir -p "$( echo $HOME/.ansible/tmp/ansible-tmp-1455033361.43-110381787053603 )" && echo "$( echo $HOME/.ansible/tmp/ansible-tmp-1455033361.43-110381787053603 )" )
127.0.0.1 PUT /tmp/tmpmh2_T0 TO /home/stack/.ansible/tmp/ansible-tmp-1455033361.43-110381787053603/os_router
127.0.0.1 EXEC LANG=en_US.utf8 LC_ALL=en_US.utf8 LC_MESSAGES=en_US.utf8 /usr/bin/python /home/stack/.ansible/tmp/ansible-tmp-1455033361.43-110381787053603/os_router; rm -rf "/home/stack/.ansible/tmp/ansible-tmp-1455033361.43-110381787053603/" > /dev/null 2>&1
changed: [localhost] => {"changed": true, "id": "e1d1931c-9a1b-48f6-810a-20d8c6e4dabf", "invocation": {"module_args": {"admin_state_up": true, "api_timeout": null, "auth": null, "auth_type": null, "availability_zone": null, "cacert": null, "cert": null, "cloud": null, "enable_snat": true, "endpoint_type": "public", "external_fixed_ips": null, "interfaces": ["demo-subnet"], "key": null, "name": "demo-router", "network": "public", "region_name": null, "state": "present", "timeout": 180, "verify": true, "wait": true}, "module_name": "os_router"}, "router": {"admin_state_up": true, "distributed": false, "external_gateway_info": {"enable_snat": true, "external_fixed_ips": [{"ip_address": "192.168.200.103", "subnet_id": "1a8bba1a-e301-4820-bdc8-5f02fef274b5"}], "network_id": "099c0071-5931-4c4c-841e-f46367c9d594"}, "ha": true, "id": "e1d1931c-9a1b-48f6-810a-20d8c6e4dabf", "name": "demo-router", "routes": [], "status": "ACTIVE", "tenant_id": "b491d28d4d07415283935fa45d760d4b"}}
TASK [debug] *******************************************************************
task path: /home/stack/ansible-populate-openstack/test.yml:144
ok: [localhost] => {
"msg": {
"changed": true,
"id": "e1d1931c-9a1b-48f6-810a-20d8c6e4dabf",
"router": {
"admin_state_up": true,
"distributed": false,
"external_gateway_info": {
"enable_snat": true,
"external_fixed_ips": [
{
"ip_address": "192.168.200.103",
"subnet_id": "1a8bba1a-e301-4820-bdc8-5f02fef274b5"
}
],
"network_id": "099c0071-5931-4c4c-841e-f46367c9d594"
},
"ha": true,
"id": "e1d1931c-9a1b-48f6-810a-20d8c6e4dabf",
"name": "demo-router",
"routes": [],
"status": "ACTIVE",
"tenant_id": "b491d28d4d07415283935fa45d760d4b"
}
}
}
TASK [Create a security group] *************************************************
task path: /home/stack/ansible-populate-openstack/test.yml:147
ESTABLISH LOCAL CONNECTION FOR USER: stack
127.0.0.1 EXEC ( umask 22 && mkdir -p "$( echo $HOME/.ansible/tmp/ansible-tmp-1455033364.58-15352104649480 )" && echo "$( echo $HOME/.ansible/tmp/ansible-tmp-1455033364.58-15352104649480 )" )
127.0.0.1 PUT /tmp/tmpyZY4U2 TO /home/stack/.ansible/tmp/ansible-tmp-1455033364.58-15352104649480/os_security_group
127.0.0.1 EXEC LANG=en_US.utf8 LC_ALL=en_US.utf8 LC_MESSAGES=en_US.utf8 /usr/bin/python /home/stack/.ansible/tmp/ansible-tmp-1455033364.58-15352104649480/os_security_group; rm -rf "/home/stack/.ansible/tmp/ansible-tmp-1455033364.58-15352104649480/" > /dev/null 2>&1
changed: [localhost] => {"changed": true, "id": "8210fcf5-4af4-4322-8ccd-aa62844f6e6c", "invocation": {"module_args": {"api_timeout": null, "auth": null, "auth_type": null, "availability_zone": null, "cacert": null, "cert": null, "cloud": null, "description": "network access for our first instance.", "endpoint_type": "public", "key": null, "name": "demo-secgroup", "region_name": null, "state": "present", "timeout": 180, "verify": true, "wait": true}, "module_name": "os_security_group"}, "secgroup": {"description": "network access for our first instance.", "id": "8210fcf5-4af4-4322-8ccd-aa62844f6e6c", "name": "demo-secgroup", "security_group_rules": [{"direction": "egress", "ethertype": "IPv4", "id": "2a6d7e82-140d-492a-aea4-04e118f350b7", "port_range_max": null, "port_range_min": null, "protocol": null, "remote_group_id": null, "remote_ip_prefix": null, "security_group_id": "8210fcf5-4af4-4322-8ccd-aa62844f6e6c", "tenant_id": "b491d28d4d07415283935fa45d760d4b"}, {"direction": "egress", "ethertype": "IPv6", "id": "85920452-b102-4285-99d8-997fc6450218", "port_range_max": null, "port_range_min": null, "protocol": null, "remote_group_id": null, "remote_ip_prefix": null, "security_group_id": "8210fcf5-4af4-4322-8ccd-aa62844f6e6c", "tenant_id": "b491d28d4d07415283935fa45d760d4b"}], "tenant_id": "b491d28d4d07415283935fa45d760d4b"}}
TASK [Create a security group rule for SSH access] *****************************
task path: /home/stack/ansible-populate-openstack/test.yml:153
ESTABLISH LOCAL CONNECTION FOR USER: stack
127.0.0.1 EXEC ( umask 22 && mkdir -p "$( echo $HOME/.ansible/tmp/ansible-tmp-1455033366.44-56774461368575 )" && echo "$( echo $HOME/.ansible/tmp/ansible-tmp-1455033366.44-56774461368575 )" )
127.0.0.1 PUT /tmp/tmpDHZwaw TO /home/stack/.ansible/tmp/ansible-tmp-1455033366.44-56774461368575/os_security_group_rule
127.0.0.1 EXEC LANG=en_US.utf8 LC_ALL=en_US.utf8 LC_MESSAGES=en_US.utf8 /usr/bin/python /home/stack/.ansible/tmp/ansible-tmp-1455033366.44-56774461368575/os_security_group_rule; rm -rf "/home/stack/.ansible/tmp/ansible-tmp-1455033366.44-56774461368575/" > /dev/null 2>&1
changed: [localhost] => {"changed": true, "id": "4dcdc798-9fc0-4b90-8f3c-ad9ab6aad244", "invocation": {"module_args": {"api_timeout": null, "auth": null, "auth_type": null, "availability_zone": null, "cacert": null, "cert": null, "cloud": null, "direction": "ingress", "endpoint_type": "public", "ethertype": "IPv4", "key": null, "port_range_max": 22, "port_range_min": 22, "protocol": "tcp", "region_name": null, "remote_group": null, "remote_ip_prefix": "0.0.0.0/0", "security_group": "demo-secgroup", "state": "present", "timeout": 180, "verify": true, "wait": true}, "module_name": "os_security_group_rule"}, "rule": {"direction": "ingress", "ethertype": "IPv4", "id": "4dcdc798-9fc0-4b90-8f3c-ad9ab6aad244", "port_range_max": 22, "port_range_min": 22, "protocol": "tcp", "remote_group_id": null, "remote_ip_prefix": "0.0.0.0/0", "security_group_id": "8210fcf5-4af4-4322-8ccd-aa62844f6e6c", "tenant_id": "b491d28d4d07415283935fa45d760d4b"}}
TASK [Create a security group rule for ICMP] ***********************************
task path: /home/stack/ansible-populate-openstack/test.yml:162
ESTABLISH LOCAL CONNECTION FOR USER: stack
127.0.0.1 EXEC ( umask 22 && mkdir -p "$( echo $HOME/.ansible/tmp/ansible-tmp-1455033368.49-273950394803501 )" && echo "$( echo $HOME/.ansible/tmp/ansible-tmp-1455033368.49-273950394803501 )" )
127.0.0.1 PUT /tmp/tmpxQTfwo TO /home/stack/.ansible/tmp/ansible-tmp-1455033368.49-273950394803501/os_security_group_rule
127.0.0.1 EXEC LANG=en_US.utf8 LC_ALL=en_US.utf8 LC_MESSAGES=en_US.utf8 /usr/bin/python /home/stack/.ansible/tmp/ansible-tmp-1455033368.49-273950394803501/os_security_group_rule; rm -rf "/home/stack/.ansible/tmp/ansible-tmp-1455033368.49-273950394803501/" > /dev/null 2>&1
changed: [localhost] => {"changed": true, "id": "077e9f10-74f5-427d-b05a-4c95e4759268", "invocation": {"module_args": {"api_timeout": null, "auth": null, "auth_type": null, "availability_zone": null, "cacert": null, "cert": null, "cloud": null, "direction": "ingress", "endpoint_type": "public", "ethertype": "IPv4", "key": null, "port_range_max": 22, "port_range_min": 22, "protocol": "icmp", "region_name": null, "remote_group": null, "remote_ip_prefix": "0.0.0.0/0", "security_group": "demo-secgroup", "state": "present", "timeout": 180, "verify": true, "wait": true}, "module_name": "os_security_group_rule"}, "rule": {"direction": "ingress", "ethertype": "IPv4", "id": "077e9f10-74f5-427d-b05a-4c95e4759268", "port_range_max": 22, "port_range_min": 22, "protocol": "icmp", "remote_group_id": null, "remote_ip_prefix": "0.0.0.0/0", "security_group_id": "8210fcf5-4af4-4322-8ccd-aa62844f6e6c", "tenant_id": "b491d28d4d07415283935fa45d760d4b"}}
TASK [Import an SSH keypair] ***************************************************
task path: /home/stack/ansible-populate-openstack/test.yml:174
ESTABLISH LOCAL CONNECTION FOR USER: stack
127.0.0.1 EXEC ( umask 22 && mkdir -p "$( echo $HOME/.ansible/tmp/ansible-tmp-1455033370.19-157120855208967 )" && echo "$( echo $HOME/.ansible/tmp/ansible-tmp-1455033370.19-157120855208967 )" )
127.0.0.1 PUT /tmp/tmpnjwmwi TO /home/stack/.ansible/tmp/ansible-tmp-1455033370.19-157120855208967/os_keypair
127.0.0.1 EXEC LANG=en_US.utf8 LC_ALL=en_US.utf8 LC_MESSAGES=en_US.utf8 /usr/bin/python /home/stack/.ansible/tmp/ansible-tmp-1455033370.19-157120855208967/os_keypair; rm -rf "/home/stack/.ansible/tmp/ansible-tmp-1455033370.19-157120855208967/" > /dev/null 2>&1
ok: [localhost] => {"changed": false, "id": "demokey", "invocation": {"module_args": {"api_timeout": null, "auth": null, "auth_type": null, "availability_zone": null, "cacert": null, "cert": null, "cloud": null, "endpoint_type": "public", "key": null, "name": "demokey", "public_key": null, "public_key_file": "/home/stack/.ssh/id_rsa.pub", "region_name": null, "state": "present", "timeout": 180, "verify": true, "wait": true}, "module_name": "os_keypair"}, "key": {"HUMAN_ID": false, "NAME_ATTR": "name", "fingerprint": "a5:eb:ae:0d:5d:28:3a:b9:e5:da:74:88:6a:72:10:02", "human_id": null, "id": "demokey", "name": "demokey", "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6zt/Ht4hxbDis6/PN5g5krpwyun6HIBeniGFxV48+mSH6nqPxN01OK5NuNQnoMy3HR0NU7ypWzku4S6q4xlxDFAFMOA3KPK73PIc6FL0jYpK9iuP+JxUvj2iG4Tz02+Y/fgNgeoeuBOn2AHwxrxchkUHyqXWERrReAYsCy4QSO5HR2/7RZaAauEH4IG0bVbyGFqiiiF6CGinoc/x+PzcOtOr9A2nYrQo9OBRnAgxdcdZACxoZkde/Tt92hmUd4uybdSo2+A6z8N0wQUM/tc9mq1r/06/N2BQ8iTI7vjRGCleHqLQtRU4AEO1KvMOgAsmnJo+WIGyfVswiJpZE00lz stack@instack.localdomain"}}
TASK [Create a compute instance] ***********************************************
task path: /home/stack/ansible-populate-openstack/test.yml:180
ESTABLISH LOCAL CONNECTION FOR USER: stack
127.0.0.1 EXEC ( umask 22 && mkdir -p "$( echo $HOME/.ansible/tmp/ansible-tmp-1455033372.52-258176500613919 )" && echo "$( echo $HOME/.ansible/tmp/ansible-tmp-1455033372.52-258176500613919 )" )
127.0.0.1 PUT /tmp/tmptgy5xW TO /home/stack/.ansible/tmp/ansible-tmp-1455033372.52-258176500613919/os_server
127.0.0.1 EXEC LANG=en_US.utf8 LC_ALL=en_US.utf8 LC_MESSAGES=en_US.utf8 /usr/bin/python /home/stack/.ansible/tmp/ansible-tmp-1455033372.52-258176500613919/os_server; rm -rf "/home/stack/.ansible/tmp/ansible-tmp-1455033372.52-258176500613919/" > /dev/null 2>&1
changed: [localhost] => {"changed": true, "id": "17822e07-1b28-4cfd-9125-cddb5b07c65b", "invocation": {"module_args": {"api_timeout": null, "auth": null, "auth_type": null, "auto_ip": true, "availability_zone": null, "boot_from_volume": false, "boot_volume": null, "cacert": null, "cert": null, "cloud": null, "config_drive": false, "endpoint_type": "public", "flavor": "m1.tiny", "flavor_include": null, "flavor_ram": null, "floating_ip_pools": null, "floating_ips": null, "image": "cirros", "image_exclude": "(deprecated)", "key": null, "key_name": "demokey", "meta": null, "name": "demoinstance", "network": null, "nics": [{"net-name": "demo-net"}], "region_name": null, "security_groups": ["default", "demo-secgroup"], "state": "present", "terminate_volume": false, "timeout": 180, "userdata": null, "verify": true, "volume_size": false, "volumes": [], "wait": true}, "module_name": "os_server"}, "openstack": {"HUMAN_ID": true, "NAME_ATTR": "name", "OS-DCF:diskConfig": "MANUAL", "OS-EXT-AZ:availability_zone": "nova", "OS-EXT-SRV-ATTR:host": "overcloud-compute-0.localdomain", "OS-EXT-SRV-ATTR:hypervisor_hostname": "overcloud-compute-0.localdomain", "OS-EXT-SRV-ATTR:instance_name": "instance-00000008", "OS-EXT-STS:power_state": 1, "OS-EXT-STS:task_state": null, "OS-EXT-STS:vm_state": "active", "OS-SRV-USG:launched_at": "2016-02-09T15:56:23.000000", "OS-SRV-USG:terminated_at": null, "accessIPv4": "192.168.200.104", "accessIPv6": "", "addresses": {"demo-net": [{"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:3e:97:17", "OS-EXT-IPS:type": "fixed", "addr": "192.168.150.103", "version": 4}, {"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:3e:97:17", "OS-EXT-IPS:type": "floating", "addr": "192.168.200.104", "version": 4}]}, "az": "nova", "cloud": "envvars", "config_drive": "", "created": "2016-02-09T15:56:15Z", "flavor": {"id": "1", "name": "m1.tiny"}, "hostId": "e97b41b5ace45b1970e0ac08a18c643d2e10b79d3867d8a17047125e", "human_id": "demoinstance", "id": "17822e07-1b28-4cfd-9125-cddb5b07c65b", "image": {"id": "4f6ad17c-ffbb-4c35-bc82-9575cd5d3110", "name": "cirros"}, "interface_ip": "192.168.200.104", "key_name": "demokey", "metadata": {}, "name": "demoinstance", "networks": {"demo-net": ["192.168.150.103", "192.168.200.104"]}, "os-extended-volumes:volumes_attached": [], "private_v4": "192.168.150.103", "progress": 0, "public_v4": "192.168.200.104", "public_v6": "", "region": "", "security_groups": [{"description": "Default security group", "id": "df02a5e0-430a-492d-a480-78c776753479", "name": "default", "security_group_rules": [{"direction": "ingress", "ethertype": "IPv4", "id": "217a5b63-d74e-40ed-bc70-9db1a7d44bca", "port_range_max": null, "port_range_min": null, "protocol": null, "remote_ip_prefix": null, "security_group_id": "df02a5e0-430a-492d-a480-78c776753479"}, {"direction": "ingress", "ethertype": "IPv4", "id": "72dbeacd-91c0-47d6-a4bc-f5fdfc77a421", "port_range_max": null, "port_range_min": null, "protocol": null, "remote_ip_prefix": null, "security_group_id": "df02a5e0-430a-492d-a480-78c776753479"}]}, {"description": "network access for our first instance.", "id": "8210fcf5-4af4-4322-8ccd-aa62844f6e6c", "name": "demo-secgroup", "security_group_rules": [{"direction": "ingress", "ethertype": "IPv4", "id": "077e9f10-74f5-427d-b05a-4c95e4759268", "port_range_max": 22, "port_range_min": 22, "protocol": "icmp", "remote_ip_prefix": "0.0.0.0/0", "security_group_id": "8210fcf5-4af4-4322-8ccd-aa62844f6e6c"}, {"direction": "ingress", "ethertype": "IPv4", "id": "4dcdc798-9fc0-4b90-8f3c-ad9ab6aad244", "port_range_max": 22, "port_range_min": 22, "protocol": "tcp", "remote_ip_prefix": "0.0.0.0/0", "security_group_id": "8210fcf5-4af4-4322-8ccd-aa62844f6e6c"}]}], "status": "ACTIVE", "tenant_id": "b491d28d4d07415283935fa45d760d4b", "updated": "2016-02-09T15:56:23Z", "user_id": "44731d0bf1a549589627c568a917825d", "volumes": []}, "server": {"HUMAN_ID": true, "NAME_ATTR": "name", "OS-DCF:diskConfig": "MANUAL", "OS-EXT-AZ:availability_zone": "nova", "OS-EXT-SRV-ATTR:host": "overcloud-compute-0.localdomain", "OS-EXT-SRV-ATTR:hypervisor_hostname": "overcloud-compute-0.localdomain", "OS-EXT-SRV-ATTR:instance_name": "instance-00000008", "OS-EXT-STS:power_state": 1, "OS-EXT-STS:task_state": null, "OS-EXT-STS:vm_state": "active", "OS-SRV-USG:launched_at": "2016-02-09T15:56:23.000000", "OS-SRV-USG:terminated_at": null, "accessIPv4": "192.168.200.104", "accessIPv6": "", "addresses": {"demo-net": [{"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:3e:97:17", "OS-EXT-IPS:type": "fixed", "addr": "192.168.150.103", "version": 4}, {"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:3e:97:17", "OS-EXT-IPS:type": "floating", "addr": "192.168.200.104", "version": 4}]}, "az": "nova", "cloud": "envvars", "config_drive": "", "created": "2016-02-09T15:56:15Z", "flavor": {"id": "1", "name": "m1.tiny"}, "hostId": "e97b41b5ace45b1970e0ac08a18c643d2e10b79d3867d8a17047125e", "human_id": "demoinstance", "id": "17822e07-1b28-4cfd-9125-cddb5b07c65b", "image": {"id": "4f6ad17c-ffbb-4c35-bc82-9575cd5d3110", "name": "cirros"}, "interface_ip": "192.168.200.104", "key_name": "demokey", "metadata": {}, "name": "demoinstance", "networks": {"demo-net": ["192.168.150.103", "192.168.200.104"]}, "os-extended-volumes:volumes_attached": [], "private_v4": "192.168.150.103", "progress": 0, "public_v4": "192.168.200.104", "public_v6": "", "region": "", "security_groups": [{"description": "Default security group", "id": "df02a5e0-430a-492d-a480-78c776753479", "name": "default", "security_group_rules": [{"direction": "ingress", "ethertype": "IPv4", "id": "217a5b63-d74e-40ed-bc70-9db1a7d44bca", "port_range_max": null, "port_range_min": null, "protocol": null, "remote_ip_prefix": null, "security_group_id": "df02a5e0-430a-492d-a480-78c776753479"}, {"direction": "ingress", "ethertype": "IPv4", "id": "72dbeacd-91c0-47d6-a4bc-f5fdfc77a421", "port_range_max": null, "port_range_min": null, "protocol": null, "remote_ip_prefix": null, "security_group_id": "df02a5e0-430a-492d-a480-78c776753479"}]}, {"description": "network access for our first instance.", "id": "8210fcf5-4af4-4322-8ccd-aa62844f6e6c", "name": "demo-secgroup", "security_group_rules": [{"direction": "ingress", "ethertype": "IPv4", "id": "077e9f10-74f5-427d-b05a-4c95e4759268", "port_range_max": 22, "port_range_min": 22, "protocol": "icmp", "remote_ip_prefix": "0.0.0.0/0", "security_group_id": "8210fcf5-4af4-4322-8ccd-aa62844f6e6c"}, {"direction": "ingress", "ethertype": "IPv4", "id": "4dcdc798-9fc0-4b90-8f3c-ad9ab6aad244", "port_range_max": 22, "port_range_min": 22, "protocol": "tcp", "remote_ip_prefix": "0.0.0.0/0", "security_group_id": "8210fcf5-4af4-4322-8ccd-aa62844f6e6c"}]}], "status": "ACTIVE", "tenant_id": "b491d28d4d07415283935fa45d760d4b", "updated": "2016-02-09T15:56:23Z", "user_id": "44731d0bf1a549589627c568a917825d", "volumes": []}}
TASK [Assign a floating IP] ****************************************************
task path: /home/stack/ansible-populate-openstack/test.yml:191
ESTABLISH LOCAL CONNECTION FOR USER: stack
127.0.0.1 EXEC ( umask 22 && mkdir -p "$( echo $HOME/.ansible/tmp/ansible-tmp-1455033391.44-244356264806552 )" && echo "$( echo $HOME/.ansible/tmp/ansible-tmp-1455033391.44-244356264806552 )" )
127.0.0.1 PUT /tmp/tmplz8So7 TO /home/stack/.ansible/tmp/ansible-tmp-1455033391.44-244356264806552/os_floating_ip
127.0.0.1 EXEC LANG=en_US.utf8 LC_ALL=en_US.utf8 LC_MESSAGES=en_US.utf8 /usr/bin/python /home/stack/.ansible/tmp/ansible-tmp-1455033391.44-244356264806552/os_floating_ip; rm -rf "/home/stack/.ansible/tmp/ansible-tmp-1455033391.44-244356264806552/" > /dev/null 2>&1
changed: [localhost] => {"changed": true, "floating_ip": {"attached": true, "fixed_ip_address": "192.168.150.103", "floating_ip_address": "192.168.200.104", "id": "d74108c5-4a5d-4dae-ad29-65e16c41ce8a", "network": "099c0071-5931-4c4c-841e-f46367c9d594", "status": null}, "invocation": {"module_args": {"api_timeout": null, "auth": null, "auth_type": null, "availability_zone": null, "cacert": null, "cert": null, "cloud": null, "endpoint_type": "public", "fixed_address": null, "floating_ip_address": null, "key": null, "network": null, "region_name": null, "reuse": false, "server": "demoinstance", "state": "present", "timeout": 60, "verify": true, "wait": false}, "module_name": "os_floating_ip"}}
TASK [Output floating IP] ******************************************************
task path: /home/stack/ansible-populate-openstack/test.yml:196
ok: [localhost] => {
"floating_ip_info.floating_ip.floating_ip_address": "192.168.200.104"
}
---------------------------------------------------------------------------------------
print(router)
{u'status': u'ACTIVE', u'external_gateway_info': {u'network_id': u'099c0071-5931-4c4c-841e-f46367c9d594', u'enable_snat': True, u'external_fixed_ips': [{u'subnet_id': u'1a8bba1a-e301-4820-bdc8-5f02fef274b5', u'ip_address': u'192.168.200.103'}]}, u'name': u'demo-router', u'admin_state_up': True, u'tenant_id': u'b491d28d4d07415283935fa45d760d4b', u'distributed': False, u'routes': [], u'ha': True, u'id': u'e1d1931c-9a1b-48f6-810a-20d8c6e4dabf'}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment