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.

56 lines
1.5 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. ---
  2. - name: gather os specific variables
  3. include_vars: "{{ item }}"
  4. with_first_found:
  5. - files:
  6. - "{{ ansible_distribution|lower }}-{{ ansible_distribution_version|lower|replace('/', '_') }}.yml"
  7. - "{{ ansible_distribution|lower }}-{{ ansible_distribution_release }}.yml"
  8. - "{{ ansible_distribution|lower }}-{{ ansible_distribution_major_version|lower|replace('/', '_') }}.yml"
  9. - "{{ ansible_distribution|lower }}.yml"
  10. - "{{ ansible_os_family|lower }}-{{ ansible_architecture }}.yml"
  11. - "{{ ansible_os_family|lower }}.yml"
  12. - defaults.yml
  13. paths:
  14. - ../vars
  15. skip: true
  16. tags:
  17. - facts
  18. - name: Add OpenShift Origin repository
  19. yum_repository:
  20. name: origin
  21. description: OpenShift Origin Repo
  22. baseurl: "{{ crio_rhel_repo_base_url }}"
  23. gpgcheck: no
  24. when: ansible_distribution in ["CentOS","RedHat"] and not is_atomic
  25. - name: Install cri-o packages
  26. package:
  27. name: "{{ item }}"
  28. state: present
  29. with_items: "{{ crio_packages }}"
  30. - name: Install cri-o config
  31. template:
  32. src: crio.conf.j2
  33. dest: /etc/crio/crio.conf
  34. - name: Copy mounts.conf
  35. copy:
  36. src: mounts.conf
  37. dest: /etc/containers/mounts.conf
  38. when:
  39. - ansible_os_family == 'RedHat'
  40. - name: Create directory for oci hooks
  41. file:
  42. path: /etc/containers/oci/hooks.d
  43. state: directory
  44. owner: root
  45. mode: 0755
  46. - name: Install cri-o service
  47. service:
  48. name: "{{ crio_service }}"
  49. enabled: yes
  50. state: restarted