mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
updated lxd_container.py docs (#8168)
linuxcontainer.org has phased out LXC/LXD support. This edit reflects part of it in the docs.
This commit is contained in:
parent
13d0310e91
commit
610ecf9bf5
1 changed files with 32 additions and 9 deletions
|
@ -86,8 +86,8 @@ options:
|
||||||
source:
|
source:
|
||||||
description:
|
description:
|
||||||
- 'The source for the instance
|
- 'The source for the instance
|
||||||
(for example V({ "type": "image", "mode": "pull", "server": "https://images.linuxcontainers.org",
|
(for example V({ "type": "image", "mode": "pull", "server": "https://cloud-images.ubuntu.com/releases/",
|
||||||
"protocol": "lxd", "alias": "ubuntu/xenial/amd64" })).'
|
"protocol": "simplestreams", "alias": "22.04" })).'
|
||||||
- 'See U(https://documentation.ubuntu.com/lxd/en/latest/api/) for complete API documentation.'
|
- 'See U(https://documentation.ubuntu.com/lxd/en/latest/api/) for complete API documentation.'
|
||||||
- 'Note that C(protocol) accepts two choices: V(lxd) or V(simplestreams).'
|
- 'Note that C(protocol) accepts two choices: V(lxd) or V(simplestreams).'
|
||||||
required: false
|
required: false
|
||||||
|
@ -205,6 +205,9 @@ notes:
|
||||||
- You can copy a file in the created instance to the localhost
|
- You can copy a file in the created instance to the localhost
|
||||||
with C(command=lxc file pull instance_name/dir/filename filename).
|
with C(command=lxc file pull instance_name/dir/filename filename).
|
||||||
See the first example below.
|
See the first example below.
|
||||||
|
- linuxcontainers.org has phased out LXC/LXD support with March 2024
|
||||||
|
(U(https://discuss.linuxcontainers.org/t/important-notice-for-lxd-users-image-server/18479)).
|
||||||
|
Currently only Ubuntu is still providing images.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
|
@ -220,9 +223,9 @@ EXAMPLES = '''
|
||||||
source:
|
source:
|
||||||
type: image
|
type: image
|
||||||
mode: pull
|
mode: pull
|
||||||
server: https://images.linuxcontainers.org
|
server: https://cloud-images.ubuntu.com/releases/
|
||||||
protocol: lxd # if you get a 404, try setting protocol: simplestreams
|
protocol: simplestreams
|
||||||
alias: ubuntu/xenial/amd64
|
alias: "22.04"
|
||||||
profiles: ["default"]
|
profiles: ["default"]
|
||||||
wait_for_ipv4_addresses: true
|
wait_for_ipv4_addresses: true
|
||||||
timeout: 600
|
timeout: 600
|
||||||
|
@ -264,6 +267,26 @@ EXAMPLES = '''
|
||||||
wait_for_ipv4_addresses: true
|
wait_for_ipv4_addresses: true
|
||||||
timeout: 600
|
timeout: 600
|
||||||
|
|
||||||
|
# An example of creating a ubuntu-minial container
|
||||||
|
- hosts: localhost
|
||||||
|
connection: local
|
||||||
|
tasks:
|
||||||
|
- name: Create a started container
|
||||||
|
community.general.lxd_container:
|
||||||
|
name: mycontainer
|
||||||
|
ignore_volatile_options: true
|
||||||
|
state: started
|
||||||
|
source:
|
||||||
|
type: image
|
||||||
|
mode: pull
|
||||||
|
# Provides Ubuntu minimal images
|
||||||
|
server: https://cloud-images.ubuntu.com/minimal/releases/
|
||||||
|
protocol: simplestreams
|
||||||
|
alias: "22.04"
|
||||||
|
profiles: ["default"]
|
||||||
|
wait_for_ipv4_addresses: true
|
||||||
|
timeout: 600
|
||||||
|
|
||||||
# An example for creating container in project other than default
|
# An example for creating container in project other than default
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
connection: local
|
connection: local
|
||||||
|
@ -278,8 +301,8 @@ EXAMPLES = '''
|
||||||
protocol: simplestreams
|
protocol: simplestreams
|
||||||
type: image
|
type: image
|
||||||
mode: pull
|
mode: pull
|
||||||
server: https://images.linuxcontainers.org
|
server: https://cloud-images.ubuntu.com/releases/
|
||||||
alias: ubuntu/20.04/cloud
|
alias: "22.04"
|
||||||
profiles: ["default"]
|
profiles: ["default"]
|
||||||
wait_for_ipv4_addresses: true
|
wait_for_ipv4_addresses: true
|
||||||
timeout: 600
|
timeout: 600
|
||||||
|
@ -347,7 +370,7 @@ EXAMPLES = '''
|
||||||
source:
|
source:
|
||||||
type: image
|
type: image
|
||||||
mode: pull
|
mode: pull
|
||||||
alias: ubuntu/xenial/amd64
|
alias: "22.04"
|
||||||
target: node01
|
target: node01
|
||||||
|
|
||||||
- name: Create container on another node
|
- name: Create container on another node
|
||||||
|
@ -358,7 +381,7 @@ EXAMPLES = '''
|
||||||
source:
|
source:
|
||||||
type: image
|
type: image
|
||||||
mode: pull
|
mode: pull
|
||||||
alias: ubuntu/xenial/amd64
|
alias: "22.04"
|
||||||
target: node02
|
target: node02
|
||||||
|
|
||||||
# An example for creating a virtual machine
|
# An example for creating a virtual machine
|
||||||
|
|
Loading…
Reference in a new issue