mirror of
https://github.com/geerlingguy/ansible-role-kubernetes.git
synced 2024-11-23 19:06:33 +01:00
Merge pull request #87 from fengye87/master
Make YUM baseurl and gpgkey configurable
This commit is contained in:
commit
41be8a0d07
@ -83,8 +83,12 @@ Options passed to `kubeadm init` when initializing the Kubernetes master. The `k
|
||||
Apt repository options for Kubernetes installation.
|
||||
|
||||
kubernetes_yum_arch: x86_64
|
||||
kubernetes_yum_base_url: "https://packages.cloud.google.com/yum/repos/kubernetes-el7-{{ kubernetes_yum_arch }}"
|
||||
kubernetes_yum_gpg_key:
|
||||
- https://packages.cloud.google.com/yum/doc/yum-key.gpg
|
||||
- https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
|
||||
|
||||
Yum repository options for Kubernetes installation.
|
||||
Yum repository options for Kubernetes installation. You can change `kubernete_yum_gpg_key` to a different url if you are behind a firewall or provide a trustworthy mirror. Usually in combination with changing `kubernetes_yum_base_url` as well.
|
||||
|
||||
kubernetes_flannel_manifest_file_rbac: https://raw.githubusercontent.com/coreos/flannel/master/Documentation/k8s-manifests/kube-flannel-rbac.yml
|
||||
kubernetes_flannel_manifest_file: https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
|
||||
|
@ -40,6 +40,10 @@ kubernetes_apt_repository: "deb http://apt.kubernetes.io/ kubernetes-xenial {{ k
|
||||
kubernetes_apt_ignore_key_error: false
|
||||
|
||||
kubernetes_yum_arch: x86_64
|
||||
kubernetes_yum_base_url: "https://packages.cloud.google.com/yum/repos/kubernetes-el7-{{ kubernetes_yum_arch }}"
|
||||
kubernetes_yum_gpg_key:
|
||||
- https://packages.cloud.google.com/yum/doc/yum-key.gpg
|
||||
- https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
|
||||
|
||||
# Flannel config files.
|
||||
kubernetes_flannel_manifest_file_rbac: https://raw.githubusercontent.com/coreos/flannel/master/Documentation/k8s-manifests/kube-flannel-rbac.yml
|
||||
|
@ -6,19 +6,15 @@
|
||||
enabled: true
|
||||
gpgcheck: true
|
||||
repo_gpgcheck: true
|
||||
baseurl: https://packages.cloud.google.com/yum/repos/kubernetes-el7-{{ kubernetes_yum_arch }}
|
||||
gpgkey:
|
||||
- https://packages.cloud.google.com/yum/doc/yum-key.gpg
|
||||
- https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
|
||||
baseurl: "{{ kubernetes_yum_base_url }}"
|
||||
gpgkey: "{{ kubernetes_yum_gpg_key }}"
|
||||
|
||||
- name: Add Kubernetes GPG keys.
|
||||
rpm_key:
|
||||
key: "{{ item }}"
|
||||
state: present
|
||||
register: kubernetes_rpm_key
|
||||
with_items:
|
||||
- https://packages.cloud.google.com/yum/doc/yum-key.gpg
|
||||
- https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
|
||||
with_items: "{{ kubernetes_yum_gpg_key }}"
|
||||
|
||||
- name: Make cache if Kubernetes GPG key changed.
|
||||
command: "yum -q makecache -y --disablerepo='*' --enablerepo='kubernetes'"
|
||||
|
Loading…
Reference in New Issue
Block a user