123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- ---
- - name: Install openshift support packages
- package:
- name: "{{ openshift_node_support_packages | join(',') }}"
- update_cache: true
- async: 3600
- poll: 30
- # FIXME: Creation of these directories should not be required for crio 1.14.5
- - name: Create CNI dirs for crio
- file:
- path: "{{ item }}"
- state: directory
- owner: root
- group: root
- mode: 0755
- loop:
- - /var/lib/cni/bin
- - /etc/kubernetes/cni/net.d/
- - /opt/cni/bin/
- - name: Get cluster version
- command: >
- oc get clusterversion
- --config={{ openshift_node_kubeconfig_path }}
- --output=jsonpath='{.items[0].status.desired.version}'
- delegate_to: localhost
- register: oc_get
- until:
- - oc_get.stdout is defined
- - oc_get.stdout != ''
- retries: 36
- delay: 5
- - name: Set fact l_cluster_version
- set_fact:
- l_cluster_version: "-{{ oc_get.stdout | regex_search('^\\d+\\.\\d+\\.\\d+') }}"
- - name: Override version when running CI
- set_fact:
- l_cluster_version: ""
- when: ci_version_override | default(False) | bool == True
- - block:
- - name: Install openshift packages
- package:
- name: "{{ openshift_node_packages | join(',') }}"
- state: present
- async: 3600
- poll: 30
- rescue:
- - name: Package install failure message
- fail:
- msg: >
- Unable to install {{ openshift_node_packages | join(', ') }}.
- Please ensure repos are configured properly to provide these packages
- and indicated versions.
- - name: Enable the CRI-O service
- systemd:
- name: "crio"
- enabled: yes
|