Browse Source

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 <bdobreli@redhat.com>
tags/2.1.0
Bogdan Dobrelya 2 years ago
parent
commit
0960fbaa28
2 changed files with 5 additions and 1 deletions
  1. 4
    0
      roles/libvirt/defaults/main.yml
  2. 1
    1
      roles/libvirt/setup/undercloud/tasks/main.yml

+ 4
- 0
roles/libvirt/defaults/main.yml View File

@@ -34,7 +34,11 @@ libvirt_arch: x86_64
34 34
 # address before giving up.
35 35
 undercloud_ip_retries: 20
36 36
 
37
+# controls either to inject instackenv.json or omit it, which may be the case
38
+# for virtual undercloud deployments w/o overcloud nodes (neither virtual,
39
+# nor BM, nor OVB hosted).
37 40
 undercloud_instackenv_template: instackenv.json.j2
41
+inject_instackenv: true
38 42
 
39 43
 # set to true if you want to inject additional overcloud
40 44
 # and ipa images. You will need to define the images and

+ 1
- 1
roles/libvirt/setup/undercloud/tasks/main.yml View File

@@ -78,7 +78,7 @@
78 78
     environment:
79 79
       LIBGUESTFS_BACKEND: direct
80 80
       LIBVIRT_DEFAULT_URI: "{{ libvirt_uri }}"
81
-    when: overcloud_nodes
81
+    when: inject_instackenv|bool
82 82
 
83 83
   # Copy the undercloud public key to the virthost, because we're going
84 84
   # to inject it into the undercloud image in the next task.

Loading…
Cancel
Save