From 80d8e21bc86a3e3f2ab50f9ff54cc800ed36347d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Mart=C3=ADn?= Date: Mon, 27 Nov 2023 14:07:34 +0100 Subject: [PATCH] image_template: allow to setup template OS and description MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allow to setup the template Operative System and the Description. Signed-off-by: Miguel Martín --- roles/image_template/README.md | 2 ++ roles/image_template/tasks/qcow2_image.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/roles/image_template/README.md b/roles/image_template/README.md index 63ecca79..bd807ad9 100644 --- a/roles/image_template/README.md +++ b/roles/image_template/README.md @@ -50,6 +50,8 @@ Role Variables | glance_image | UNDEF (mandatory if qcow_url is not used) | This parameter specifies the name of disk in glance provider to be imported as template. | | template_prerequisites_tasks | UNDEF | Works only with qcow image. Specify a path to Ansible tasks file, which should be executed on virtual machine before creating a template from it. Note that qcow image must contain guest agent which reports IP address. | | template_version_name | "base version" | Version name of the template. Allows to create different versions of a template. | +| template_description | UNDEF | Sets the template description | +| template_operating_system | UNDEF | Sets the template Operative System | The `template_disks` List of dictionaries can contain following attributes: diff --git a/roles/image_template/tasks/qcow2_image.yml b/roles/image_template/tasks/qcow2_image.yml index aab5f2b3..4d0751b8 100644 --- a/roles/image_template/tasks/qcow2_image.yml +++ b/roles/image_template/tasks/qcow2_image.yml @@ -233,6 +233,8 @@ seal: "{{ template_seal }}" version: name: "{{ { template_version_name | default('base version') }}" + description: "{{ template_description | default(omit)}}" + operating_system: "{{ template_operating_system | default(omit)}}" when: template_info.ovirt_templates | length == 0 tags: - ovirt-template-image