Skip to content

Commit

Permalink
Clean up ifevals to be more accommodating for adding new install inst…
Browse files Browse the repository at this point in the history
…ructions
  • Loading branch information
simu committed Oct 26, 2023
1 parent 0059b62 commit 5ad0843
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
10 changes: 8 additions & 2 deletions docs/modules/ROOT/partials/install/prepare-syn-config.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,21 @@ yq eval -i ".parameters.openshift4_version.spec.channel = \"fast-{ocp-minor-vers
----
====

ifeval::["{provider}" == "cloudscale"]
:is-terraform: yes
endif::[]
ifeval::["{provider}" == "exoscale"]
:is-terraform: yes
endif::[]

ifeval::["{provider}" != "vsphere"]
ifeval::["{is-terraform}" == "yes"]
include::partial$install/prepare-syn-config-terraform.adoc[]
endif::[]
ifeval::["{provider}" == "vsphere"]
include::partial$install/prepare-syn-config-vsphere.adoc[]
endif::[]

ifeval::["{provider}" != "vsphere"]
ifeval::["{is-terraform}" == "yes"]
[TIP]
====
You now have the option to further customize the cluster by editing `terraform_variables`.
Expand Down
5 changes: 3 additions & 2 deletions docs/modules/ROOT/partials/install/vshn-input.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
ifeval::["{provider}" != "vsphere"]
:needs_hieradata_edit: yes
ifeval::["{provider}" == "vsphere"]
:needs_hieradata_edit: no
:needs_gitlab: no
endif::[]

include::partial$vshn-input.adoc[]
Expand Down
4 changes: 2 additions & 2 deletions docs/modules/ROOT/partials/vshn-input.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ifeval::["{provider}" != "vsphere"]
ifeval::["{needs_gitlab}" != "no"]
.Access to VSHN GitLab
[source,bash]
----
Expand All @@ -20,7 +20,7 @@ export CLUSTER_ID=<lieutenant-cluster-id> # Looks like: c-<something>
export TENANT_ID=$(curl -sH "Authorization: Bearer $(commodore fetch-token)" ${COMMODORE_API_URL}/clusters/${CLUSTER_ID} | jq -r .tenant)
----

ifeval::["{needs_hieradata_edit}" == "yes"]
ifeval::["{needs_hieradata_edit}" != "no"]
.Configuration for hieradata commits
[source,bash]
----
Expand Down

0 comments on commit 5ad0843

Please sign in to comment.