Allow lxc_container settings per container type

Allow the lxc_container settings to be set in the environment properties per
container type, similar to how the "container_release" and
"service_name" are set in the environment per container.

The vars that are now settable in properties are:
* container_config
* container_template
* container_backing_store
* container_fs_size
* container_fs_type
* container_vg_name

Change-Id: Ic31365ca50543d0ce2e315bb9187bee6c7493a9d
Partial-Bug: #1442115
This commit is contained in:
Andy McCrae 2015-04-09 12:50:54 +01:00 committed by Jesse Pretorius
parent 4c4fbe25c3
commit 8b5d8f5b5c

View File

@ -53,13 +53,13 @@
lxc_container:
name: "{{ inventory_hostname }}"
container_log: "true"
config: "{{ lxc_container_config }}"
template: "{{ lxc_container_template }}"
config: "{{ properties.container_config|default(lxc_container_config) }}"
template: "{{ properties.container_template|default(lxc_container_template) }}"
state: started
backing_store: "{{ lxc_container_backing_store }}"
fs_size: "{{ lxc_container_fs_size }}"
fs_type: "{{ lxc_container_fs_type }}"
vg_name: "{{ lxc_container_vg_name }}"
backing_store: "{{ properties.container_backing_store|default(lxc_container_backing_store) }}"
fs_size: "{{ properties.container_fs_size|default(lxc_container_fs_size) }}"
fs_type: "{{ properties.container_fs_type|default(lxc_container_fs_type) }}"
vg_name: "{{ properties.container_vg_name|default(lxc_container_vg_name) }}"
template_options: "--release {{ properties.container_release|default(lxc_container_release) }}"
container_command: |
mkdir -p ~/.ssh/