mirror of
https://github.com/geerlingguy/ansible-role-kubernetes.git
synced 2024-11-18 19:10:39 +01:00
Make YUM baseurl and gpgkey configurable
This commit is contained in:
parent
2f4fc8f39d
commit
a3714d8b79
@ -83,8 +83,12 @@ Options passed to `kubeadm init` when initializing the Kubernetes master. The `k
|
|||||||
Apt repository options for Kubernetes installation.
|
Apt repository options for Kubernetes installation.
|
||||||
|
|
||||||
kubernetes_yum_arch: x86_64
|
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_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
|
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_apt_ignore_key_error: false
|
||||||
|
|
||||||
kubernetes_yum_arch: x86_64
|
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.
|
# Flannel config files.
|
||||||
kubernetes_flannel_manifest_file_rbac: https://raw.githubusercontent.com/coreos/flannel/master/Documentation/k8s-manifests/kube-flannel-rbac.yml
|
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
|
enabled: true
|
||||||
gpgcheck: true
|
gpgcheck: true
|
||||||
repo_gpgcheck: true
|
repo_gpgcheck: true
|
||||||
baseurl: https://packages.cloud.google.com/yum/repos/kubernetes-el7-{{ kubernetes_yum_arch }}
|
baseurl: "{{ kubernetes_yum_base_url }}"
|
||||||
gpgkey:
|
gpgkey: "{{ 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
|
|
||||||
|
|
||||||
- name: Add Kubernetes GPG keys.
|
- name: Add Kubernetes GPG keys.
|
||||||
rpm_key:
|
rpm_key:
|
||||||
key: "{{ item }}"
|
key: "{{ item }}"
|
||||||
state: present
|
state: present
|
||||||
register: kubernetes_rpm_key
|
register: kubernetes_rpm_key
|
||||||
with_items:
|
with_items: "{{ 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
|
|
||||||
|
|
||||||
- name: Make cache if Kubernetes GPG key changed.
|
- name: Make cache if Kubernetes GPG key changed.
|
||||||
command: "yum -q makecache -y --disablerepo='*' --enablerepo='kubernetes'"
|
command: "yum -q makecache -y --disablerepo='*' --enablerepo='kubernetes'"
|
||||||
|
Loading…
Reference in New Issue
Block a user