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.

77 lines
2.0 KiB

9 years ago
  1. ---
  2. - import_tasks: pre-upgrade.yml
  3. tags:
  4. - k8s-pre-upgrade
  5. - import_tasks: users-file.yml
  6. when:
  7. - kube_basic_auth|default(true)
  8. - name: Create webhook token auth config
  9. template:
  10. src: webhook-token-auth-config.yaml.j2
  11. dest: "{{ kube_config_dir }}/webhook-token-auth-config.yaml"
  12. when: kube_webhook_token_auth|default(false)
  13. - import_tasks: encrypt-at-rest.yml
  14. when:
  15. - kube_encrypt_secret_data
  16. - name: Install | Copy kubectl binary from download dir
  17. synchronize:
  18. src: "{{ local_release_dir }}/hyperkube"
  19. dest: "{{ bin_dir }}/kubectl"
  20. compress: no
  21. perms: yes
  22. owner: no
  23. group: no
  24. changed_when: false
  25. delegate_to: "{{ inventory_hostname }}"
  26. tags:
  27. - hyperkube
  28. - kubectl
  29. - upgrade
  30. - name: install | Set kubectl binary permissions
  31. file:
  32. path: "{{ bin_dir }}/kubectl"
  33. mode: "0755"
  34. state: file
  35. tags:
  36. - hyperkube
  37. - kubectl
  38. - upgrade
  39. - name: Make sure bash_completion.d folder exists
  40. file:
  41. name: "/etc/bash_completion.d/"
  42. state: directory
  43. when: ansible_os_family in ["ClearLinux"]
  44. tags:
  45. - kubectl
  46. - name: Install kubectl bash completion
  47. shell: "{{ bin_dir }}/kubectl completion bash >/etc/bash_completion.d/kubectl.sh"
  48. when: ansible_os_family in ["Debian","RedHat"]
  49. tags:
  50. - kubectl
  51. - name: Set kubectl bash completion file
  52. file:
  53. path: /etc/bash_completion.d/kubectl.sh
  54. owner: root
  55. group: root
  56. mode: 0755
  57. when: ansible_os_family in ["Debian","RedHat"]
  58. tags:
  59. - kubectl
  60. - upgrade
  61. - name: Disable SecurityContextDeny admission-controller and enable PodSecurityPolicy
  62. set_fact:
  63. kube_apiserver_admission_control: "{{ kube_apiserver_admission_control | default([]) | difference(['SecurityContextDeny']) | union(['PodSecurityPolicy']) | unique }}"
  64. kube_apiserver_enable_admission_plugins: "{{ kube_apiserver_enable_admission_plugins | difference(['SecurityContextDeny']) | union(['PodSecurityPolicy']) | unique }}"
  65. when: podsecuritypolicy_enabled
  66. - name: Include kubeadm setup
  67. import_tasks: kubeadm-setup.yml