12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- ---
- - name: Enable bootstrapping in the master config
- yedit:
- src: /etc/origin/master/master-config.yaml
- edits:
- - key: kubernetesMasterConfig.controllerArguments.cluster-signing-cert-file
- value:
- - /etc/origin/master/ca.crt
- - key: kubernetesMasterConfig.controllerArguments.cluster-signing-key-file
- value:
- - /etc/origin/master/ca.key
- when:
- - openshift_control_plane_apply_cluster_signing_config | default(True)
- - name: Create temp directory for static pods
- command: mktemp -d /tmp/openshift-ansible-XXXXXX
- register: mktemp
- changed_when: false
- - name: Prepare master static pods
- copy:
- src: "{{ item }}"
- dest: "{{ mktemp.stdout }}"
- mode: 0600
- with_items:
- - apiserver.yaml
- - controller.yaml
- - name: Update master static pods
- yedit:
- src: "{{ mktemp.stdout }}/{{ item }}"
- edits:
- - key: spec.containers[0].image
- value: "{{ osm_image }}"
- with_items:
- - apiserver.yaml
- - controller.yaml
- - name: Update master static pod (api)
- yedit:
- src: "{{ mktemp.stdout }}/apiserver.yaml"
- edits:
- - key: spec.containers[0].livenessProbe.httpGet.port
- value: "{{ openshift_master_api_port }}"
- - key: spec.containers[0].readinessProbe.httpGet.port
- value: "{{ openshift_master_api_port }}"
- - name: ensure pod location exists
- file:
- path: "{{ openshift_control_plane_static_pod_location }}"
- state: directory
- mode: "0755"
- - name: Update master static pods
- copy:
- remote_src: true
- src: "{{ mktemp.stdout }}/{{ item }}"
- dest: "{{ openshift_control_plane_static_pod_location }}"
- mode: 0600
- with_items:
- - apiserver.yaml
- - controller.yaml
- - name: Remove old files in /etc/sysconfig
- file:
- name: "{{ item }}"
- state: absent
- with_items:
- - /etc/sysconfig/{{ openshift_service_type }}-master-api
- - /etc/sysconfig/{{ openshift_service_type }}-master-controllers
- - name: Remove temporary directory
- file:
- name: "{{ mktemp.stdout }}"
- state: absent
- changed_when: False
|