Skip to content

Commit

Permalink
Move cri_socket var to kubespray-defaults (#5149)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattymo authored and k8s-ci-robot committed Sep 10, 2019
1 parent 27ec548 commit eb40ac1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
15 changes: 0 additions & 15 deletions roles/download/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,6 @@
- download
- upload

- name: Use cri-o for cri connection
set_fact:
cri_socket: /var/run/crio/crio.sock
when: container_manager == 'crio'

- name: Use containerd for cri connection
set_fact:
cri_socket: /var/run/containerd/containerd.sock
when: container_manager == 'containerd'

- name: Use docker for cri connection
set_fact:
cri_socket: /var/run/dockershim.sock
when: container_manager == 'docker'

- include_tasks: ../../container-engine/containerd/tasks/crictl.yml
when:
- not skip_downloads|default(false)
Expand Down
10 changes: 10 additions & 0 deletions roles/kubespray-defaults/defaults/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,16 @@ kube_profiling: false
# Container for runtime
container_manager: docker

# CRI socket path
cri_socket: >-
{%- if container_manager == 'crio' -%}
/var/run/crio/crio.sock
{%- elif container_manager == 'containerd' -%}
/var/run/containerd/containerd.sock
{%- else -%}
/var/run/dockershim.sock
{%- endif -%}
## Uncomment this if you want to force overlay/overlay2 as docker storage driver
## Please note that overlay2 is only supported on newer kernels
# docker_storage_options: -s overlay2
Expand Down

0 comments on commit eb40ac1

Please sign in to comment.