Skip to content

Instantly share code, notes, and snippets.

@dpantel
Created October 13, 2018 18: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 dpantel/c4b693fedd749feadc4f81117a217b52 to your computer and use it in GitHub Desktop.
Save dpantel/c4b693fedd749feadc4f81117a217b52 to your computer and use it in GitHub Desktop.
Ansible lxd_container output
TASK [lxd-container : LXD | Create and start container 'test'] *******************************************************************************************************************
task path: /home/user/ansible/provision/roles/lxd-container/tasks/main.yml:22
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/basic.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/lxd.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/_text.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/parsing/convert_bool.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/parsing/__init__.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/pycompat24.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/six/__init__.py
Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/urls.py
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/cloud/lxd/lxd_container.py
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: user
<127.0.0.1> EXEC /bin/sh -c 'echo ~ && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/user/.ansible/tmp/ansible-tmp-1539453289.0-118137482817959 `" && echo ansible-tmp-1539453289.0-118137482817959="` echo /home/user/.ansible/tmp/ansible-tmp-1539453289.0-118137482817959 `" ) && sleep 0'
<127.0.0.1> PUT /home/user/.ansible/tmp/ansible-local-29296M1Yqon/tmpVwwAG_ TO /home/user/.ansible/tmp/ansible-tmp-1539453289.0-118137482817959/lxd_container.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/user/.ansible/tmp/ansible-tmp-1539453289.0-118137482817959/ /home/user/.ansible/tmp/ansible-tmp-1539453289.0-118137482817959/lxd_container.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'sudo -H -S -p "[sudo via ansible, key=vozigcjieevhffjqvtihirtujivbmxkm] password: " -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-vozigcjieevhffjqvtihirtujivbmxkm; /usr/bin/python /home/user/.ansible/tmp/ansible-tmp-1539453289.0-118137482817959/lxd_container.py'"'"' && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/user/.ansible/tmp/ansible-tmp-1539453289.0-118137482817959/ > /dev/null 2>&1 && sleep 0'
changed: [localhost] => {
"actions": [
"create",
"start"
],
"addresses": {
"eth0": [
"10.0.0.187"
]
},
"changed": true,
"invocation": {
"module_args": {
"architecture": null,
"cert_file": "/root/.config/lxc/client.crt",
"config": {
"user.network-config": "{\"ethernets\": {\"eth0\": {\"addresses\": [\"10.0.0.115/24\"], \"gateway4\": \"10.0.0.1\"}}, \"version\": 2}"
},
"description": null,
"devices": null,
"ephemeral": null,
"force_stop": false,
"key_file": "/root/.config/lxc/client.key",
"name": "test",
"profiles": [
"test"
],
"source": {
"alias": "ubuntu/bionic/amd64",
"mode": "pull",
"protocol": "simplestreams",
"server": "https://images.linuxcontainers.org",
"type": "image"
},
"state": "started",
"timeout": 30,
"trust_password": null,
"url": "unix:/var/lib/lxd/unix.socket",
"wait_for_ipv4_addresses": true
}
},
"log_verbosity": 5,
"logs": [
{
"request": {
"json": null,
"method": "GET",
"timeout": null,
"url": "/1.0/containers/test"
},
"response": {
"json": {
"error": "not found",
"error_code": 404,
"type": "error"
}
},
"type": "sent request"
},
{
"request": {
"json": {
"config": {
"user.network-config": "{\"ethernets\": {\"eth0\": {\"addresses\": [\"10.0.0.115/24\"], \"gateway4\": \"10.0.0.1\"}}, \"version\": 2}"
},
"name": "test",
"profiles": [
"test"
],
"source": {
"alias": "ubuntu/bionic/amd64",
"mode": "pull",
"protocol": "simplestreams",
"server": "https://images.linuxcontainers.org",
"type": "image"
}
},
"method": "POST",
"timeout": null,
"url": "/1.0/containers"
},
"response": {
"json": {
"error": "",
"error_code": 0,
"metadata": {
"class": "task",
"created_at": "2018-10-13T11:54:49.155925857-06:00",
"description": "Creating container",
"err": "",
"id": "f57d9efa-2c6f-408b-a93f-942d6ae7a9db",
"may_cancel": false,
"metadata": null,
"resources": {
"containers": [
"/1.0/containers/test"
]
},
"status": "Running",
"status_code": 103,
"updated_at": "2018-10-13T11:54:49.155925857-06:00"
},
"operation": "/1.0/operations/f57d9efa-2c6f-408b-a93f-942d6ae7a9db",
"status": "Operation created",
"status_code": 100,
"type": "async"
}
},
"type": "sent request"
},
{
"request": {
"json": null,
"method": "GET",
"timeout": null,
"url": "/1.0/operations/f57d9efa-2c6f-408b-a93f-942d6ae7a9db/wait"
},
"response": {
"json": {
"error": "",
"error_code": 0,
"metadata": {
"class": "task",
"created_at": "2018-10-13T11:54:49.155925857-06:00",
"description": "Creating container",
"err": "",
"id": "f57d9efa-2c6f-408b-a93f-942d6ae7a9db",
"may_cancel": false,
"metadata": null,
"resources": {
"containers": [
"/1.0/containers/test"
]
},
"status": "Success",
"status_code": 200,
"updated_at": "2018-10-13T11:54:49.155925857-06:00"
},
"operation": "",
"status": "Success",
"status_code": 200,
"type": "sync"
}
},
"type": "sent request"
},
{
"request": {
"json": {
"action": "start",
"timeout": 30
},
"method": "PUT",
"timeout": null,
"url": "/1.0/containers/test/state"
},
"response": {
"json": {
"error": "",
"error_code": 0,
"metadata": {
"class": "task",
"created_at": "2018-10-13T11:54:52.049349124-06:00",
"description": "Starting container",
"err": "",
"id": "878ca4d4-0ca6-4dff-9832-f1a5fb33bc44",
"may_cancel": false,
"metadata": null,
"resources": {
"containers": [
"/1.0/containers/test"
]
},
"status": "Running",
"status_code": 103,
"updated_at": "2018-10-13T11:54:52.049349124-06:00"
},
"operation": "/1.0/operations/878ca4d4-0ca6-4dff-9832-f1a5fb33bc44",
"status": "Operation created",
"status_code": 100,
"type": "async"
}
},
"type": "sent request"
},
{
"request": {
"json": null,
"method": "GET",
"timeout": null,
"url": "/1.0/operations/878ca4d4-0ca6-4dff-9832-f1a5fb33bc44/wait"
},
"response": {
"json": {
"error": "",
"error_code": 0,
"metadata": {
"class": "task",
"created_at": "2018-10-13T11:54:52.049349124-06:00",
"description": "Starting container",
"err": "",
"id": "878ca4d4-0ca6-4dff-9832-f1a5fb33bc44",
"may_cancel": false,
"metadata": null,
"resources": {
"containers": [
"/1.0/containers/test"
]
},
"status": "Success",
"status_code": 200,
"updated_at": "2018-10-13T11:54:52.049349124-06:00"
},
"operation": "",
"status": "Success",
"status_code": 200,
"type": "sync"
}
},
"type": "sent request"
},
{
"request": {
"json": null,
"method": "GET",
"timeout": null,
"url": "/1.0/containers/test/state"
},
"response": {
"json": {
"error": "",
"error_code": 0,
"metadata": {
"cpu": {
"usage": 309380917
},
"disk": {},
"memory": {
"swap_usage": 0,
"swap_usage_peak": 0,
"usage": 70778880,
"usage_peak": 71548928
},
"network": {
"eth0": {
"addresses": [
{
"address": "fe80::216:3eff:fef2:7c41",
"family": "inet6",
"netmask": "64",
"scope": "link"
}
],
"counters": {
"bytes_received": 528,
"bytes_sent": 594,
"packets_received": 6,
"packets_sent": 4
},
"host_name": "vethQAB85C",
"hwaddr": "00:16:3e:f2:7c:41",
"mtu": 1500,
"state": "up",
"type": "broadcast"
},
"lo": {
"addresses": [
{
"address": "127.0.0.1",
"family": "inet",
"netmask": "8",
"scope": "local"
},
{
"address": "::1",
"family": "inet6",
"netmask": "128",
"scope": "local"
}
],
"counters": {
"bytes_received": 0,
"bytes_sent": 0,
"packets_received": 0,
"packets_sent": 0
},
"host_name": "",
"hwaddr": "",
"mtu": 65536,
"state": "up",
"type": "loopback"
}
},
"pid": 29415,
"processes": 14,
"status": "Running",
"status_code": 103
},
"operation": "",
"status": "Success",
"status_code": 200,
"type": "sync"
}
},
"type": "sent request"
},
{
"request": {
"json": null,
"method": "GET",
"timeout": null,
"url": "/1.0/containers/test/state"
},
"response": {
"json": {
"error": "",
"error_code": 0,
"metadata": {
"cpu": {
"usage": 310751941
},
"disk": {},
"memory": {
"swap_usage": 0,
"swap_usage_peak": 0,
"usage": 70770688,
"usage_peak": 71548928
},
"network": {
"eth0": {
"addresses": [
{
"address": "fe80::216:3eff:fef2:7c41",
"family": "inet6",
"netmask": "64",
"scope": "link"
}
],
"counters": {
"bytes_received": 1871,
"bytes_sent": 1172,
"packets_received": 16,
"packets_sent": 8
},
"host_name": "vethQAB85C",
"hwaddr": "00:16:3e:f2:7c:41",
"mtu": 1500,
"state": "up",
"type": "broadcast"
},
"lo": {
"addresses": [
{
"address": "127.0.0.1",
"family": "inet",
"netmask": "8",
"scope": "local"
},
{
"address": "::1",
"family": "inet6",
"netmask": "128",
"scope": "local"
}
],
"counters": {
"bytes_received": 0,
"bytes_sent": 0,
"packets_received": 0,
"packets_sent": 0
},
"host_name": "",
"hwaddr": "",
"mtu": 65536,
"state": "up",
"type": "loopback"
}
},
"pid": 29415,
"processes": 14,
"status": "Running",
"status_code": 103
},
"operation": "",
"status": "Success",
"status_code": 200,
"type": "sync"
}
},
"type": "sent request"
},
{
"request": {
"json": null,
"method": "GET",
"timeout": null,
"url": "/1.0/containers/test/state"
},
"response": {
"json": {
"error": "",
"error_code": 0,
"metadata": {
"cpu": {
"usage": 310859936
},
"disk": {},
"memory": {
"swap_usage": 0,
"swap_usage_peak": 0,
"usage": 70770688,
"usage_peak": 71548928
},
"network": {
"eth0": {
"addresses": [
{
"address": "fe80::216:3eff:fef2:7c41",
"family": "inet6",
"netmask": "64",
"scope": "link"
}
],
"counters": {
"bytes_received": 2320,
"bytes_sent": 1172,
"packets_received": 19,
"packets_sent": 8
},
"host_name": "vethQAB85C",
"hwaddr": "00:16:3e:f2:7c:41",
"mtu": 1500,
"state": "up",
"type": "broadcast"
},
"lo": {
"addresses": [
{
"address": "127.0.0.1",
"family": "inet",
"netmask": "8",
"scope": "local"
},
{
"address": "::1",
"family": "inet6",
"netmask": "128",
"scope": "local"
}
],
"counters": {
"bytes_received": 0,
"bytes_sent": 0,
"packets_received": 0,
"packets_sent": 0
},
"host_name": "",
"hwaddr": "",
"mtu": 65536,
"state": "up",
"type": "loopback"
}
},
"pid": 29415,
"processes": 14,
"status": "Running",
"status_code": 103
},
"operation": "",
"status": "Success",
"status_code": 200,
"type": "sync"
}
},
"type": "sent request"
},
{
"request": {
"json": null,
"method": "GET",
"timeout": null,
"url": "/1.0/containers/test/state"
},
"response": {
"json": {
"error": "",
"error_code": 0,
"metadata": {
"cpu": {
"usage": 322633726
},
"disk": {},
"memory": {
"swap_usage": 0,
"swap_usage_peak": 0,
"usage": 71172096,
"usage_peak": 71630848
},
"network": {
"eth0": {
"addresses": [
{
"address": "10.0.0.187",
"family": "inet",
"netmask": "24",
"scope": "global"
},
{
"address": "fe80::216:3eff:fef2:7c41",
"family": "inet6",
"netmask": "64",
"scope": "link"
}
],
"counters": {
"bytes_received": 3621,
"bytes_sent": 1512,
"packets_received": 24,
"packets_sent": 9
},
"host_name": "vethQAB85C",
"hwaddr": "00:16:3e:f2:7c:41",
"mtu": 1500,
"state": "up",
"type": "broadcast"
},
"lo": {
"addresses": [
{
"address": "127.0.0.1",
"family": "inet",
"netmask": "8",
"scope": "local"
},
{
"address": "::1",
"family": "inet6",
"netmask": "128",
"scope": "local"
}
],
"counters": {
"bytes_received": 0,
"bytes_sent": 0,
"packets_received": 0,
"packets_sent": 0
},
"host_name": "",
"hwaddr": "",
"mtu": 65536,
"state": "up",
"type": "loopback"
}
},
"pid": 29415,
"processes": 14,
"status": "Running",
"status_code": 103
},
"operation": "",
"status": "Success",
"status_code": 200,
"type": "sync"
}
},
"type": "sent request"
}
],
"old_state": "absent"
}
META: ran handlers
META: ran handlers
PLAY RECAP ***********************************************************************************************************************************************************************
localhost : ok=3 changed=1 unreachable=0 failed=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment