diff --git a/cluster.yml b/cluster.yml index da4a0b69a..f4e7d10e5 100644 --- a/cluster.yml +++ b/cluster.yml @@ -60,7 +60,7 @@ roles: - { role: kubespray-defaults} - { role: kubernetes/preinstall, tags: preinstall } - - { role: "container-engine", tags: "container-engine" } + - { role: "container-engine", tags: "container-engine", when: deploy_container_engine|default(true) } - { role: download, tags: download, when: "not skip_downloads" } environment: "{{proxy_env}}" diff --git a/inventory/sample/group_vars/all/all.yml b/inventory/sample/group_vars/all/all.yml index 8a9a03250..24d74ed60 100644 --- a/inventory/sample/group_vars/all/all.yml +++ b/inventory/sample/group_vars/all/all.yml @@ -82,6 +82,10 @@ skip_non_kubeadm_warning: false ## Set true to download and cache container #download_container: true +## Deploy container engine +# Set false if you want to deploy container engine manually. +#deploy_container_engine: true + ## Set Pypi repo and cert accordingly #pyrepo_index: https://pypi.example.com/simple #pyrepo_cert: /etc/ssl/certs/ca-certificates.crt diff --git a/roles/reset/tasks/main.yml b/roles/reset/tasks/main.yml index 4ff3e1f80..7b4f041d1 100644 --- a/roles/reset/tasks/main.yml +++ b/roles/reset/tasks/main.yml @@ -75,7 +75,7 @@ delay: 5 tags: - crio - when: container_manager == 'crio' + when: container_manager == 'crio' and deploy_container_engine|default(true) - name: reset | gather mounted kubelet dirs shell: mount | grep /var/lib/kubelet/ | awk '{print $3}' | tac diff --git a/scale.yml b/scale.yml index 970897be6..348ec28ba 100644 --- a/scale.yml +++ b/scale.yml @@ -62,7 +62,7 @@ roles: - { role: kubespray-defaults} - { role: kubernetes/preinstall, tags: preinstall } - - { role: container-engine, tags: "container-engine"} + - { role: container-engine, tags: "container-engine", when: deploy_container_engine|default(true) } - { role: download, tags: download, when: "not skip_downloads" } - { role: etcd, tags: etcd, etcd_cluster_setup: false } - { role: kubernetes/node, tags: node } diff --git a/upgrade-cluster.yml b/upgrade-cluster.yml index 88202768c..cddc2e959 100644 --- a/upgrade-cluster.yml +++ b/upgrade-cluster.yml @@ -61,7 +61,7 @@ roles: - { role: kubespray-defaults} - { role: kubernetes/preinstall, tags: preinstall } - - { role: container-engine, tags: "container-engine"} + - { role: container-engine, tags: "container-engine", when: deploy_container_engine|default(true) } - { role: download, tags: download, when: "not skip_downloads" } environment: "{{proxy_env}}"