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