From 0960fbaa286e99b79c5304fb86f8b2e012e28ecd Mon Sep 17 00:00:00 2001 From: Bogdan Dobrelya Date: Wed, 26 Apr 2017 16:25:06 +0200 Subject: [PATCH] Control injection of instackenv.json Allow users to control if instackenv.json must be injected for undercloud image or omitted. The latter may be the case when installing only a virtual undercloud node w/o overcloud nodes at all. Related-bug: #1676373 Change-Id: Iac245daceab01302e7e4cb75458901a0c0af47df Signed-off-by: Bogdan Dobrelya --- roles/libvirt/defaults/main.yml | 4 ++++ roles/libvirt/setup/undercloud/tasks/main.yml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/roles/libvirt/defaults/main.yml b/roles/libvirt/defaults/main.yml index 16d0bc4cb..ad1f9770a 100644 --- a/roles/libvirt/defaults/main.yml +++ b/roles/libvirt/defaults/main.yml @@ -34,7 +34,11 @@ libvirt_arch: x86_64 # address before giving up. undercloud_ip_retries: 20 +# controls either to inject instackenv.json or omit it, which may be the case +# for virtual undercloud deployments w/o overcloud nodes (neither virtual, +# nor BM, nor OVB hosted). undercloud_instackenv_template: instackenv.json.j2 +inject_instackenv: true # set to true if you want to inject additional overcloud # and ipa images. You will need to define the images and diff --git a/roles/libvirt/setup/undercloud/tasks/main.yml b/roles/libvirt/setup/undercloud/tasks/main.yml index a4a132b2a..8c41f3504 100644 --- a/roles/libvirt/setup/undercloud/tasks/main.yml +++ b/roles/libvirt/setup/undercloud/tasks/main.yml @@ -78,7 +78,7 @@ environment: LIBGUESTFS_BACKEND: direct LIBVIRT_DEFAULT_URI: "{{ libvirt_uri }}" - when: overcloud_nodes + when: inject_instackenv|bool # Copy the undercloud public key to the virthost, because we're going # to inject it into the undercloud image in the next task.