--- - name: Update systemd units include_tasks: ../systemd_units.yml when: openshift_is_containerized | bool - name: Update oreg value yedit: src: "{{ openshift.common.config_base }}/node/node-config.yaml" key: 'imageConfig.format' value: "{{ oreg_url | default(oreg_url_node) }}" when: oreg_url is defined or oreg_url_node is defined - name: Remove obsolete docker-sdn-ovs.conf file: path: "/etc/systemd/system/docker.service.d/docker-sdn-ovs.conf" state: absent # https://bugzilla.redhat.com/show_bug.cgi?id=1513054 - name: Clean up dockershim data file: path: "/var/lib/dockershim/sandbox/" state: absent # https://bugzilla.redhat.com/show_bug.cgi?id=1518912 - name: Clean up IPAM data file: path: "/var/lib/cni/networks/openshift-sdn/" state: absent # Disable Swap Block (pre) - block: - name: Remove swap entries from /etc/fstab replace: dest: /etc/fstab regexp: '(^[^#].*swap.*)' replace: '# \1' backup: yes - name: Add notice about disabling swap lineinfile: dest: /etc/fstab line: '# OpenShift-Ansible Installer disabled swap per overcommit guidelines' state: present - name: Disable swap command: swapoff --all when: - openshift_node_upgrade_swap_result | default(False) | bool - openshift_disable_swap | default(true) | bool # End Disable Swap Block - name: Apply 3.6 dns config changes yedit: src: /etc/origin/node/node-config.yaml key: "{{ item.key }}" value: "{{ item.value }}" with_items: - key: "dnsBindAddress" value: "127.0.0.1:53" - key: "dnsRecursiveResolvConf" value: "/etc/origin/node/resolv.conf" - name: Install Node service file template: dest: "/etc/systemd/system/{{ openshift_service_type }}-node.service" src: "node.service.j2" register: l_node_unit when: not openshift_is_containerized | bool - name: Reset selinux context command: restorecon -RF {{ openshift_node_data_dir }}/openshift.local.volumes when: - ansible_selinux is defined - ansible_selinux.status == 'enabled' # NOTE: This is needed to make sure we are using the correct set # of systemd unit files. The RPMs lay down defaults but # the install/upgrade may override them in /etc/systemd/system/. # NOTE: We don't use the systemd module as some versions of the module # require a service to be part of the call. - name: Reload systemd units command: systemctl daemon-reload