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.

28 lines
988 B

  1. ---
  2. - hosts: kube-node:kube_control_plane
  3. tasks:
  4. - name: Remove old cloud provider config
  5. file:
  6. path: "{{ item }}"
  7. state: absent
  8. with_items:
  9. - /etc/kubernetes/cloud_config
  10. - hosts: kube_control_plane[0]
  11. tasks:
  12. - name: Include kubespray-default variables
  13. include_vars: ../roles/kubespray-defaults/defaults/main.yaml
  14. - name: Copy get_cinder_pvs.sh to master
  15. copy:
  16. src: get_cinder_pvs.sh
  17. dest: /tmp
  18. mode: u+rwx
  19. - name: Get PVs provisioned by in-tree cloud provider # noqa 301
  20. command: /tmp/get_cinder_pvs.sh
  21. register: pvs
  22. - name: Remove get_cinder_pvs.sh
  23. file:
  24. path: /tmp/get_cinder_pvs.sh
  25. state: absent
  26. - name: Rewrite the "pv.kubernetes.io/provisioned-by" annotation # noqa 301
  27. command: "{{ bin_dir }}/kubectl annotate --overwrite pv {{ item }} pv.kubernetes.io/provisioned-by=cinder.csi.openstack.org"
  28. loop: "{{ pvs.stdout_lines | list }}"