mirror of
https://github.com/geerlingguy/ansible-role-kubernetes.git
synced 2024-12-21 19:06:56 +01:00
simplify
This commit is contained in:
parent
1eb8be8309
commit
0b73d150af
@ -52,11 +52,8 @@ kubernetes_version_kubeadm: 'stable-{{ kubernetes_version }}'
|
||||
kubernetes_ignore_preflight_errors: 'all'
|
||||
|
||||
kubernetes_apt_release_channel: "stable"
|
||||
kubernetes_apt_keyring_file: "/etc/apt/keyrings/kubernetes-apt-keyring.gpg"
|
||||
kubernetes_apt_repository_pkgs_k8s_io: "deb [signed-by={{ kubernetes_apt_keyring_file }}] https://pkgs.k8s.io/core:/{{ kubernetes_apt_release_channel }}:/v{{ kubernetes_version }}/deb/ /"
|
||||
kubernetes_apt_ignore_key_error: false
|
||||
# this one is deprecated and will be deleted with this role
|
||||
kubernetes_apt_repository: "deb http://apt.kubernetes.io/ kubernetes-xenial {{ kubernetes_apt_release_channel }}"
|
||||
kubernetes_apt_keyring_file: "/etc/apt/keyrings/kubernetes-apt-keyring.asc"
|
||||
kubernetes_apt_repository: "deb [signed-by={{ kubernetes_apt_keyring_file }}] https://pkgs.k8s.io/core:/{{ kubernetes_apt_release_channel }}:/v{{ kubernetes_version }}/deb/ /"
|
||||
|
||||
kubernetes_yum_arch: '$basearch'
|
||||
kubernetes_yum_base_url: "https://packages.cloud.google.com/yum/repos/kubernetes-el7-{{ kubernetes_yum_arch }}"
|
||||
|
@ -13,9 +13,11 @@
|
||||
mode: 0755
|
||||
|
||||
- name: Get Kubernetes apt key.
|
||||
shell: "curl -fsSL https://pkgs.k8s.io/core:/{{ kubernetes_apt_release_channel }}:/v{{ kubernetes_version }}/deb/Release.key | gpg --dearmor -o {{ kubernetes_apt_keyring_file }}"
|
||||
args:
|
||||
creates: "{{ kubernetes_apt_keyring_file }}"
|
||||
ansible.builtin.get_url:
|
||||
url: "https://pkgs.k8s.io/core:/{{ kubernetes_apt_release_channel }}:/v{{ kubernetes_version }}/deb/Release.key"
|
||||
dest: "{{ kubernetes_apt_keyring_file }}"
|
||||
mode: '0644'
|
||||
force: true
|
||||
|
||||
- name: Be sure deprecated Kubernetes repository is absent.
|
||||
file:
|
||||
@ -24,7 +26,7 @@
|
||||
|
||||
- name: Add Kubernetes repository.
|
||||
ansible.builtin.apt_repository:
|
||||
repo: "{{ kubernetes_apt_repository_pkgs_k8s_io }}"
|
||||
repo: "{{ kubernetes_apt_repository }}"
|
||||
filename: pkgs_k8s_io
|
||||
state: present
|
||||
update_cache: true
|
||||
|
Loading…
Reference in New Issue
Block a user