Skip to content

Commit

Permalink
Fix kubernetes repository
Browse files Browse the repository at this point in the history
Fixes #9
- implement new repo for redhat and debian
  • Loading branch information
$full_name committed Nov 2, 2023
1 parent e253147 commit 6a06452
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions roles/install_devops_tools/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
ansible.builtin.yum_repository:
name: "kubernetes"
description: "Kubernetes Stable"
baseurl: "https://packages.cloud.google.com/yum/repos/kubernetes-el7-$basearch"
gpgkey: "https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg"
baseurl: "https://pkgs.k8s.io/core:/stable:/v1.28/rpm/"
gpgkey: "https://pkgs.k8s.io/core:/stable:/v1.28/rpm/repodata/repomd.xml.key"
gpgcheck: true
enabled: true
when: ansible_facts['os_family'] == "RedHat"
Expand All @@ -26,15 +26,14 @@
- name: "Add repository for kubectl (Debian)"
when: ansible_facts['os_family'] == "Debian"
block:
- name: "Download kubectl gpg key"
ansible.builtin.get_url:
url: "https://packages.cloud.google.com/apt/doc/apt-key.gpg"
dest: "/usr/share/keyrings/kubernetes-archive-keyring.gpg"
mode: "0644"
- name: Add an Apt signing key to a specific keyring file
ansible.builtin.apt_key:
url: https://pkgs.k8s.io/core:/stable:/v1.28/deb/Release.key
keyring: /etc/apt/keyrings/kubernetes-apt-keyring.gpg

- name: "Add kubectl repo"
ansible.builtin.apt_repository:
repo: "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main"
repo: "deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.28/deb/ /"
filename: "kubernetes"

- name: "Add repository for Hashicorp (Debian)"
Expand Down

0 comments on commit 6a06452

Please sign in to comment.