You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.5 KiB

  1. ---
  2. - block:
  3. - name: look up docker cgroup driver
  4. shell: "docker info | grep 'Cgroup Driver' | awk -F': ' '{ print $2; }'"
  5. register: docker_cgroup_driver_result
  6. changed_when: false
  7. - name: set kubelet_cgroup_driver_detected fact for docker
  8. set_fact:
  9. kubelet_cgroup_driver_detected: "{{ docker_cgroup_driver_result.stdout }}"
  10. when: container_manager == 'docker'
  11. - block:
  12. - name: look up crio cgroup driver
  13. shell: "crio-status info | grep 'cgroup driver' | awk -F': ' '{ print $2; }'"
  14. register: crio_cgroup_driver_result
  15. changed_when: false
  16. - name: set kubelet_cgroup_driver_detected fact for crio
  17. set_fact:
  18. kubelet_cgroup_driver_detected: "{{ crio_cgroup_driver_result.stdout }}"
  19. when: container_manager == 'crio'
  20. - name: set kubelet_cgroup_driver_detected fact for containerd
  21. set_fact:
  22. kubelet_cgroup_driver_detected: >-
  23. {%- if containerd_use_systemd_cgroup -%}systemd{%- else -%}cgroupfs{%- endif -%}
  24. when: container_manager == 'containerd'
  25. - name: os specific vars
  26. include_vars: "{{ item }}"
  27. with_first_found:
  28. - files:
  29. - "{{ ansible_distribution|lower }}-{{ ansible_distribution_version|lower|replace('/', '_') }}.yml"
  30. - "{{ ansible_distribution|lower }}-{{ ansible_distribution_release }}.yml"
  31. - "{{ ansible_distribution|lower }}-{{ ansible_distribution_major_version|lower|replace('/', '_') }}.yml"
  32. - "{{ ansible_distribution|lower }}.yml"
  33. - "{{ ansible_os_family|lower }}.yml"
  34. skip: true