From e0ea41b4f897a248d19fba28db66d0d129aaf61b Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Mon, 14 Nov 2016 13:15:39 +0000 Subject: [PATCH] Add ability to set a container base name prefix In order to facilitate role-based base containers when copy-on-write containers are created, a prefix can now be used to differentiate the base containers. Change-Id: If8094d5bc6a52524128bcaddff2aaf20acf39833 --- defaults/main.yml | 5 +++-- .../lxc-container-base-name-prefix-dcf5ad3d914df59c.yaml | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/lxc-container-base-name-prefix-dcf5ad3d914df59c.yaml diff --git a/defaults/main.yml b/defaults/main.yml index d199ea5..fde9bee 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -43,8 +43,9 @@ lxc_container_default_bind_mounts: container_directory: "/var/backup" # When using a base container to snapshot from for the overlayfs or LVM -# copy-on-write backing stored, the base container can be set. -lxc_container_base_name: "{{ lxc_container_map.distro }}-{{ lxc_container_map.release }}-{{ lxc_container_map.arch }}" +# copy-on-write backing stored, the base container prefix/name can be set. +lxc_container_base_name_prefix: '' +lxc_container_base_name: "{{ lxc_container_base_name_prefix }}{{ lxc_container_map.distro }}-{{ lxc_container_map.release }}-{{ lxc_container_map.arch }}" # Mappings from Ansible reported architecture to distro release architecture lxc_architecture_mapping: diff --git a/releasenotes/notes/lxc-container-base-name-prefix-dcf5ad3d914df59c.yaml b/releasenotes/notes/lxc-container-base-name-prefix-dcf5ad3d914df59c.yaml new file mode 100644 index 0000000..d21e748 --- /dev/null +++ b/releasenotes/notes/lxc-container-base-name-prefix-dcf5ad3d914df59c.yaml @@ -0,0 +1,4 @@ +--- +features: + - When using a copy-on-write backing store, the lxc_container_base_name can + now include a prefix defined by ``lxc_container_base_name_prefix``.