---
- name: Install Node service file
  template:
    dest: "/etc/systemd/system/{{ openshift_service_type }}-node.service"
    src: "{{ openshift_is_containerized | bool | ternary('openshift.docker.node.service', 'node.service.j2') }}"
  when: not l_is_node_system_container | bool
  notify:
  - reload systemd units
  - restart node

- when: openshift_is_containerized | bool
  block:
  - name: include node deps docker service file
    import_tasks: config/install-node-deps-docker-service-file.yml

  - name: include ovs service environment file
    import_tasks: config/install-ovs-service-env-file.yml
    when:
    - not openshift_use_external_openvswitch | bool

  - import_tasks: config/install-ovs-docker-service-file.yml
    when:
    - openshift_node_use_openshift_sdn | bool
    - not l_is_openvswitch_system_container | bool
    - not openshift_use_external_openvswitch | bool

- import_tasks: config/configure-node-settings.yml
- import_tasks: config/configure-proxy-settings.yml
