static.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. ---
  2. - name: Enable bootstrapping in the master config
  3. yedit:
  4. src: /etc/origin/master/master-config.yaml
  5. edits:
  6. - key: kubernetesMasterConfig.controllerArguments.cluster-signing-cert-file
  7. value:
  8. - /etc/origin/master/ca.crt
  9. - key: kubernetesMasterConfig.controllerArguments.cluster-signing-key-file
  10. value:
  11. - /etc/origin/master/ca.key
  12. - name: Create temp directory for static pods
  13. command: mktemp -d /tmp/openshift-ansible-XXXXXX
  14. register: mktemp
  15. changed_when: false
  16. - name: Prepare master static pods
  17. copy:
  18. src: "{{ item }}"
  19. dest: "{{ mktemp.stdout }}"
  20. mode: 0600
  21. with_items:
  22. - apiserver.yaml
  23. - controller.yaml
  24. - name: Update master static pods
  25. yedit:
  26. src: "{{ mktemp.stdout }}/{{ item }}"
  27. edits:
  28. - key: spec.containers[0].image
  29. value: "{{ osm_image }}"
  30. with_items:
  31. - apiserver.yaml
  32. - controller.yaml
  33. - name: Update master static pod (api)
  34. yedit:
  35. src: "{{ mktemp.stdout }}/apiserver.yaml"
  36. edits:
  37. - key: spec.containers[0].livenessProbe.httpGet.port
  38. value: "{{ openshift_master_api_port }}"
  39. - key: spec.containers[0].readinessProbe.httpGet.port
  40. value: "{{ openshift_master_api_port }}"
  41. - name: Update master static pods
  42. copy:
  43. remote_src: true
  44. src: "{{ mktemp.stdout }}/{{ item }}"
  45. dest: "/etc/origin/node/pods/"
  46. mode: 0600
  47. with_items:
  48. - apiserver.yaml
  49. - controller.yaml
  50. - name: Remove old files in /etc/sysconfig
  51. file:
  52. name: "{{ item }}"
  53. state: absent
  54. with_items:
  55. - /etc/sysconfig/{{ openshift_service_type }}-master-api
  56. - /etc/sysconfig/{{ openshift_service_type }}-master-controllers
  57. - name: Remove temporary directory
  58. file:
  59. name: "{{ mktemp.stdout }}"
  60. state: absent
  61. changed_when: False