src: "index.yaml.j2"
dest: "{{ engine_workspace }}/offline/charts/stable/index.yaml"
force: true
+
+ - name: Create local repo index (empty initially)
+ command: "helm repo index {{ engine_workspace }}/offline/charts/local/"
+ args:
+ creates: "{{ engine_workspace }}/offline/charts/local/index.yaml"
when: execution_mode == "offline-deployment"
- name: Initialize Helm
and execution_mode == "online-deployment"
and helm_repo_list_result is not search(stable_repo_url)
+- name: Add local helm repo (helm v3+)
+ command: "helm repo add local {{ local_repo_url }}"
+ register: helm_repo_add_local_result
+ changed_when: true
+ when: >
+ helm_version is version('v3.0.0', '>=')
+ and execution_mode == "offline-deployment"
+ and helm_repo_list_result is not search(local_repo_url)
+
- name: Clone Helm Charts repository
git:
repo: "{{ helm_charts_git_url }}"
src: "index.yaml.j2"
dest: "{{ engine_workspace }}/offline/charts/stable/index.yaml"
force: true
+
+ - name: Create local repo index (empty initially)
+ command: "helm repo index {{ engine_workspace }}/offline/charts/local/"
+ creates: "{{ engine_workspace }}/offline/charts/local/index.yaml"
when: execution_mode == "offline-deployment"
- name: Initialize Helm
and execution_mode == "online-deployment"
and helm_repo_list_result is not search(stable_repo_url)
+- name: Add local helm repo (helm v3+)
+ command: "helm repo add local {{ local_repo_url }}"
+ register: helm_repo_add_local_result
+ changed_when: true
+ when: >
+ helm_version is version('v3.0.0', '>=')
+ and execution_mode == "offline-deployment"
+ and helm_repo_list_result is not search(local_repo_url)
+
- name: Clone Helm Charts repository
git:
repo: "{{ helm_charts_git_url }}"
- name: Install openshift
pip:
- name: openshift
+ name: "openshift=={{ openshift_version }}"
- name: Ensure /root/.kube folder exists and empty
file:
src: "{{ engine_cache }}/repos/kubespray/inventory/engine/artifacts/admin.conf"
dest: "/root/.kube/config"
owner: "root"
- mode: 0644
+ mode: 0600
- name: Download kubectl and place it to /usr/local/bin
get_url:
# ============LICENSE_END=========================================================
jumphost: "{{ 'jumphost' if provisioner_type == 'heat' else 'localhost' }}"
+# NOTE (cian): pinning openshift due to regression in 0.12
+# Ref: https://github.com/ansible-collections/community.kubernetes/issues/283
+openshift_version: "0.11"
# vim: set ts=2 sw=2 expandtab: