summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFatih Degirmenci <fdegir@gmail.com>2019-09-02 12:57:30 +0200
committerFatih Degirmenci <fdegir@gmail.com>2019-09-02 13:37:15 +0200
commit97eda4fa0bdf8ae8ead6471b9efebe48edbf4a99 (patch)
treeb91483055be6fc5a275551e728389a79e226fa0a
parent24729584009efe0ebe3ba2a18bcad72d3b4c7889 (diff)
Document why a separate task is needed for ansible_env.HOME
installer-type:kubespray deploy-scenario:k8-calico-nofeature Change-Id: Ic76b6407d1f0ddf8fde6dd3400c0576c8ce8692e Signed-off-by: Fatih Degirmenci <fdegir@gmail.com>
-rw-r--r--xci/installer/kubespray/playbooks/configure-installer.yml4
-rw-r--r--xci/installer/osh/playbooks/configure-installer.yml4
2 files changed, 8 insertions, 0 deletions
diff --git a/xci/installer/kubespray/playbooks/configure-installer.yml b/xci/installer/kubespray/playbooks/configure-installer.yml
index 1f3b3d6f..d88ee55c 100644
--- a/xci/installer/kubespray/playbooks/configure-installer.yml
+++ b/xci/installer/kubespray/playbooks/configure-installer.yml
@@ -33,6 +33,10 @@
- { regexp: "kube_basic_auth:.*", line: "kube_basic_auth: true" }
- { regexp: "dashboard_enabled:.*", line: "dashboard_enabled: true" }
+# NOTE(fdegir): the reason for this task to be separate from the task which uses lineinfile
+# module is that escaping curly braces does not work with with_items. what happens is that
+# ansible tries to resolve {{ ansible_env.HOME }} which we don't want since it should point
+# to home folder of the user executing this task at runtime.
- name: update kubespray artifacts_dir
lineinfile:
path: "{{ xci_path }}/.cache/repos/kubespray/inventory/opnfv/group_vars/k8s-cluster/k8s-cluster.yml"
diff --git a/xci/installer/osh/playbooks/configure-installer.yml b/xci/installer/osh/playbooks/configure-installer.yml
index 905777d0..383f55fc 100644
--- a/xci/installer/osh/playbooks/configure-installer.yml
+++ b/xci/installer/osh/playbooks/configure-installer.yml
@@ -34,6 +34,10 @@
- { regexp: "kube_basic_auth:.*", line: "kube_basic_auth: true" }
- { regexp: "dashboard_enabled:.*", line: "dashboard_enabled: true" }
+# NOTE(fdegir): the reason for this task to be separate from the task which uses lineinfile
+# module is that escaping curly braces does not work with with_items. what happens is that
+# ansible tries to resolve {{ ansible_env.HOME }} which we don't want since it should point
+# to home folder of the user executing this task at runtime.
- name: update kubespray artifacts_dir
lineinfile:
path: "{{ xci_path }}/.cache/repos/kubespray/inventory/opnfv/group_vars/k8s-cluster/k8s-cluster.yml"