we try to run ansible to create LXD but have problem this below log:
“logs”: [
{
“request”: {
“json”: null,
“method”: “GET”,
“timeout”: null,
“url”: “/1.0/containers/mycontainer”
},
“response”: {
“json”: {
“error”: “not found”,
“error_code”: 404,
“type”: “error”
}
},
“type”: “sent request”
},
{
“request”: {
“json”: {
“name”: “mycontainer”,
“profiles”: [
“default”
],
“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”: “No storage pool found. Please create a new storage pool”,
“error_code”: 400,
“type”: “error”
}
},
“type”: “sent request”
}
],
“msg”: “No storage pool found. Please create a new storage pool”
}
I try to using curl to test APT then API working. But with anisble not working. This below is content of ansible:
- hosts: localhost
connection: local
tasks:- name: Create a started container
lxd_container:
name: mycontainer
state: started
source:
type: image
mode: pull
server: https://images.linuxcontainers.org
alias: ubuntu/bionic/amd64
protocol: simplestreams
profiles: [“default”]
wait_for_ipv4_addresses: true
timeout: 600
- name: Create a started container
Someone have ideal to solve this case ?