config_changes.yml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. ---
  2. - name: Update oreg value
  3. yedit:
  4. src: "{{ openshift.common.config_base }}/node/node-config.yaml"
  5. key: 'imageConfig.format'
  6. value: "{{ oreg_url | default(oreg_url_node) }}"
  7. when: oreg_url is defined or oreg_url_node is defined
  8. - name: Ensure the node static pod directory exists
  9. file:
  10. path: "{{ openshift.common.config_base }}/node/pods"
  11. state: directory
  12. mode: 0755
  13. - name: Update node-config for static pods
  14. yedit:
  15. src: "{{ openshift.common.config_base }}/node/node-config.yaml"
  16. edits:
  17. - key: kubeletArguments.pod-manifest-path
  18. value:
  19. - "{{ openshift.common.config_base }}/node/pods"
  20. # https://bugzilla.redhat.com/show_bug.cgi?id=1518912
  21. # - name: Clean up IPAM data
  22. # file:
  23. # path: "/var/lib/cni/networks/openshift-sdn/"
  24. # state: absent
  25. - name: Uninstall openvswitch
  26. package:
  27. name: openvswitch
  28. state: absent
  29. when: not openshift_is_atomic | bool
  30. - name: Remove old service information
  31. file:
  32. path: "{{ item }}"
  33. state: absent
  34. with_items:
  35. - /etc/systemd/system/docker.service.d/docker-sdn-ovs.conf
  36. - /etc/systemd/system/atomic-openshift-node-dep.service
  37. - /etc/systemd/system/origin-node-dep.service
  38. - /etc/systemd/system/openvswitch.service
  39. - name: Move existing credentials and configuration into bootstrap configuration
  40. import_tasks: bootstrap_changes.yml
  41. when: openshift_node_bootstrap | default(True) | bool
  42. - name: Reset selinux context
  43. command: restorecon -RF {{ openshift_node_data_dir }}/openshift.local.volumes
  44. when:
  45. - ansible_selinux is defined
  46. - ansible_selinux.status == 'enabled'
  47. - name: Update systemd units
  48. import_tasks: ../systemd_units.yml
  49. # NOTE: This is needed to make sure we are using the correct set
  50. # of systemd unit files. The RPMs lay down defaults but
  51. # the install/upgrade may override them in /etc/systemd/system/.
  52. # NOTE: We don't use the systemd module as some versions of the module
  53. # require a service to be part of the call.
  54. - name: Reload systemd units
  55. command: systemctl daemon-reload