You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.2 KiB

  1. ---
  2. - name: OCI Cloud Controller | Check Oracle Cloud credentials
  3. import_tasks: credentials-check.yml
  4. - name: "OCI Cloud Controller | Generate Cloud Provider Configuration"
  5. template:
  6. src: controller-manager-config.yml.j2
  7. dest: "{{ kube_config_dir }}/controller-manager-config.yml"
  8. mode: "0644"
  9. when: inventory_hostname == groups['kube_control_plane'][0]
  10. - name: "OCI Cloud Controller | Slurp Configuration"
  11. slurp:
  12. src: "{{ kube_config_dir }}/controller-manager-config.yml"
  13. register: controller_manager_config
  14. - name: "OCI Cloud Controller | Encode Configuration"
  15. set_fact:
  16. controller_manager_config_base64: "{{ controller_manager_config.content }}"
  17. when: inventory_hostname == groups['kube_control_plane'][0]
  18. - name: "OCI Cloud Controller | Generate Manifests"
  19. template:
  20. src: oci-cloud-provider.yml.j2
  21. dest: "{{ kube_config_dir }}/oci-cloud-provider.yml"
  22. mode: "0644"
  23. when: inventory_hostname == groups['kube_control_plane'][0]
  24. - name: "OCI Cloud Controller | Apply Manifests"
  25. kube:
  26. kubectl: "{{ bin_dir }}/kubectl"
  27. filename: "{{ kube_config_dir }}/oci-cloud-provider.yml"
  28. state: latest
  29. when: inventory_hostname == groups['kube_control_plane'][0]