diff --git a/tasks/Debian.yaml b/tasks/Debian.yaml index 0be2c550..fd8ed78e 100644 --- a/tasks/Debian.yaml +++ b/tasks/Debian.yaml @@ -3,9 +3,11 @@ block: when: "kube_version is version('1.24', '>=')" - - set_fact: - kube_minor_version: "{{ kube_version.split('.')[0] }}"."{{ kube_version.split('.')[1] }}" + - name: Set kube_minor_version + set_fact: + kube_minor_version: "{{ kube_version.split('.')[0] }}"."{{ kube_version.split('.')[1] }}" + - name: Add repo key get_url: url: "https://pkgs.k8s.io/core:/stable:/v1.{{ kube_minor_version }}/deb/Release.key" dest: /etc/apt/keyrings/kubernetes-apt-keyring.asc diff --git a/tasks/RedHat.yaml b/tasks/RedHat.yaml index 10c8334e..9566e987 100644 --- a/tasks/RedHat.yaml +++ b/tasks/RedHat.yaml @@ -3,10 +3,12 @@ block: when: "kube_version is version('1.24', '>=')" - - set_fact: - kube_minor_version: "{{ kube_version.split('.')[0] }}"."{{ kube_version.split('.')[1] }}" + - name: Set kube_minor_version + set_fact: + kube_minor_version: "{{ kube_version.split('.')[0] }}"."{{ kube_version.split('.')[1] }}" - - copy: + - name: Set repo file + copy: dest: /etc/yum.repos.d/kubernetes.repo content: | [kubernetes]