--- - name: Check that node image is present command: 'docker images -q "{{ osn_image }}"' register: node_image # This task runs async to save time while the node is being configured - name: Pre-pull node image docker_image: name: "{{ osn_image }}" environment: NO_PROXY: "{{ openshift.common.no_proxy | default('') }}" when: node_image.stdout_lines == [] # 10 minutes to pull the image async: 600 poll: 0 register: image_prepull - name: Install the systemd units import_tasks: systemd_units.yml - file: dest: "{{ l2_openshift_node_kubelet_args['config'] }}" state: directory when: ('config' in l2_openshift_node_kubelet_args) | bool # TODO: add the validate parameter when there is a validation command to run - name: Create the Node config template: dest: "{{ openshift.common.config_base }}/node/node-config.yaml" src: node.yaml.v1.j2 backup: true owner: root group: root mode: 0600 - name: Configure Node Environment Variables lineinfile: dest: /etc/sysconfig/{{ openshift_service_type }}-node regexp: "^{{ item.key }}=" line: "{{ item.key }}={{ item.value }}" create: true with_dict: "{{ openshift_node_env_vars }}" - name: Ensure the node static pod directory exists file: path: "{{ openshift.common.config_base }}/node/pods" state: directory mode: 0755 - name: include aws provider credentials import_tasks: aws.yml when: not (openshift_node_use_instance_profiles | default(False)) - name: Check status of node image pre-pull async_status: jid: "{{ image_prepull.ansible_job_id }}" register: job_result until: job_result.finished when: - node_image.stdout_lines == [] - not openshift_is_atomic | bool retries: 30 delay: 10 failed_when: false