Allow container creation based on variant property
Currently the variant used for container creation is a universal override. This patch allows the use of an inventory property to set the variant, allowing per container overrides of the variant. Also, a new variable is created which allows any arbitrary additional options to be given to the creation process, allowing other lxc-create options to be passed in. Change-Id: Id391c3ba245c53e1d82d7eb57187cbf1a952d6cf
This commit is contained in:
parent
bacff9d12b
commit
d9ec5de2d1
|
@ -93,13 +93,15 @@ lxc_image_cache_server: images.linuxcontainers.org
|
|||
# --server SERVER_TO_GET_IMAGES_FROM
|
||||
lxc_container_template: download
|
||||
lxc_container_variant: default
|
||||
lxc_container_download_template_extra_options: ""
|
||||
lxc_container_download_template_options: >
|
||||
--dist {{ lxc_container_map.distro }}
|
||||
--release {{ lxc_container_map.release }}
|
||||
--arch {{ lxc_container_map.arch }}
|
||||
--force-cache
|
||||
--server {{ lxc_image_cache_server }}
|
||||
--variant={{ lxc_container_variant }}
|
||||
--variant={{ properties['lxc_container_variant'] | default(lxc_container_variant) }}
|
||||
{{ lxc_container_download_template_extra_options }}
|
||||
|
||||
# Toggle the restart of containers via the handler.
|
||||
lxc_container_allow_restarts: yes
|
||||
|
|
Loading…
Reference in New Issue