systemd_units.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # This file is included both in the openshift_master role and in the upgrade
  2. # playbooks.
  3. - name: Install Node docker service file
  4. template:
  5. dest: "/etc/systemd/system/{{ openshift.common.service_type }}-node.service"
  6. src: openshift.docker.node.service
  7. register: install_node_result
  8. when: openshift.common.is_containerized | bool
  9. - name: Create the openvswitch service env file
  10. template:
  11. src: openvswitch.sysconfig.j2
  12. dest: /etc/sysconfig/openvswitch
  13. when: openshift.common.is_containerized | bool
  14. register: install_ovs_sysconfig
  15. - name: Install OpenvSwitch docker service file
  16. template:
  17. dest: "/etc/systemd/system/openvswitch.service"
  18. src: openvswitch.docker.service
  19. when: openshift.common.is_containerized | bool and openshift.common.use_openshift_sdn | bool
  20. notify:
  21. - restart openvswitch
  22. - name: Configure Node settings
  23. lineinfile:
  24. dest: /etc/sysconfig/{{ openshift.common.service_type }}-node
  25. regexp: "{{ item.regex }}"
  26. line: "{{ item.line }}"
  27. create: true
  28. with_items:
  29. - regex: '^OPTIONS='
  30. line: "OPTIONS=--loglevel={{ openshift.node.debug_level }}"
  31. - regex: '^CONFIG_FILE='
  32. line: "CONFIG_FILE={{ openshift_node_config_file }}"
  33. - regex: '^IMAGE_VERSION='
  34. line: "IMAGE_VERSION={{ openshift_version }}"
  35. notify:
  36. - restart node