2018-07-20 22:56:38 +08:00
|
|
|
---
|
|
|
|
|
|
|
|
- include: credentials-check.yml
|
|
|
|
tags: oci
|
|
|
|
|
2019-02-12 04:08:53 +08:00
|
|
|
- name: "OCI Cloud Controller | Generate Cloud Provider Configuration"
|
2018-07-20 22:56:38 +08:00
|
|
|
template:
|
|
|
|
src: controller-manager-config.yml.j2
|
2019-02-12 04:08:53 +08:00
|
|
|
dest: "{{ kube_config_dir }}/controller-manager-config.yml"
|
2022-01-09 17:51:12 +08:00
|
|
|
mode: 0644
|
2021-03-24 08:26:05 +08:00
|
|
|
when: inventory_hostname == groups['kube_control_plane'][0]
|
2018-07-20 22:56:38 +08:00
|
|
|
tags: oci
|
|
|
|
|
2019-02-12 04:08:53 +08:00
|
|
|
- name: "OCI Cloud Controller | Slurp Configuration"
|
|
|
|
slurp:
|
|
|
|
src: "{{ kube_config_dir }}/controller-manager-config.yml"
|
|
|
|
register: controller_manager_config
|
|
|
|
|
2018-07-20 22:56:38 +08:00
|
|
|
- name: "OCI Cloud Controller | Encode Configuration"
|
|
|
|
set_fact:
|
2019-02-12 04:08:53 +08:00
|
|
|
controller_manager_config_base64: "{{ controller_manager_config.content }}"
|
2021-03-24 08:26:05 +08:00
|
|
|
when: inventory_hostname == groups['kube_control_plane'][0]
|
2018-07-20 22:56:38 +08:00
|
|
|
tags: oci
|
|
|
|
|
2019-02-12 04:08:53 +08:00
|
|
|
- name: "OCI Cloud Controller | Generate Manifests"
|
2018-07-20 22:56:38 +08:00
|
|
|
template:
|
2019-02-12 04:08:53 +08:00
|
|
|
src: oci-cloud-provider.yml.j2
|
|
|
|
dest: "{{ kube_config_dir }}/oci-cloud-provider.yml"
|
2022-01-09 17:51:12 +08:00
|
|
|
mode: 0644
|
2021-03-24 08:26:05 +08:00
|
|
|
when: inventory_hostname == groups['kube_control_plane'][0]
|
2018-07-20 22:56:38 +08:00
|
|
|
tags: oci
|
|
|
|
|
2019-02-12 04:08:53 +08:00
|
|
|
- name: "OCI Cloud Controller | Apply Manifests"
|
2018-07-20 22:56:38 +08:00
|
|
|
kube:
|
|
|
|
kubectl: "{{ bin_dir }}/kubectl"
|
2019-02-12 04:08:53 +08:00
|
|
|
filename: "{{ kube_config_dir }}/oci-cloud-provider.yml"
|
2018-08-25 02:05:38 +08:00
|
|
|
state: latest
|
2021-03-24 08:26:05 +08:00
|
|
|
when: inventory_hostname == groups['kube_control_plane'][0]
|
2018-07-20 22:56:38 +08:00
|
|
|
tags: oci
|