mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 07:47:56 +00:00
Packge install on CentOS 7
This commit is contained in:
parent
f259892cc9
commit
45bdfeac0c
5
contrib/ansible/roles/common/files/virt7-testing.repo
Normal file
5
contrib/ansible/roles/common/files/virt7-testing.repo
Normal file
@ -0,0 +1,5 @@
|
||||
[virt7-testing]
|
||||
name=virt7-testing
|
||||
baseurl=http://cbs.centos.org/repos/virt7-testing/x86_64/os/
|
||||
enabled=0
|
||||
gpgcheck=0
|
3
contrib/ansible/roles/common/tasks/centos.yml
Normal file
3
contrib/ansible/roles/common/tasks/centos.yml
Normal file
@ -0,0 +1,3 @@
|
||||
---
|
||||
- name: CentOS | Install Testing centos7 repo for new tool versions
|
||||
copy: src=virt7-testing.repo dest=/etc/yum.repos.d/virt7-testing.repo
|
@ -16,3 +16,6 @@
|
||||
# collect information about what packages are installed
|
||||
- include: rpm.yml
|
||||
when: ansible_pkg_mgr == "yum"
|
||||
|
||||
- include: centos.yml
|
||||
when: ansible_distribution == "CentOS"
|
||||
|
5
contrib/ansible/roles/master/tasks/centos.yml
Normal file
5
contrib/ansible/roles/master/tasks/centos.yml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
- name: CentOS | Install kubernetes CentOS style
|
||||
yum: pkg=kubernetes state=latest enablerepo=virt7-testing
|
||||
notify:
|
||||
- restart daemons
|
7
contrib/ansible/roles/master/tasks/generic-install.yml
Normal file
7
contrib/ansible/roles/master/tasks/generic-install.yml
Normal file
@ -0,0 +1,7 @@
|
||||
- name: Install kubernetes
|
||||
action: "{{ ansible_pkg_mgr }}"
|
||||
args:
|
||||
name: kubernetes-master
|
||||
state: latest
|
||||
notify:
|
||||
- restart daemons
|
@ -1,12 +1,9 @@
|
||||
---
|
||||
- name: Install kubernetes
|
||||
action: "{{ ansible_pkg_mgr }}"
|
||||
args:
|
||||
name: kubernetes-master
|
||||
state: latest
|
||||
notify:
|
||||
- restart daemons
|
||||
when: not is_atomic
|
||||
- include: generic-install.yml
|
||||
when: not is_atomic and not ansible_distribution == "CentOS"
|
||||
|
||||
- include: centos.yml
|
||||
when: not is_atomic and ansible_distribution == "CentOS"
|
||||
|
||||
- name: write the config file for the api server
|
||||
template: src=apiserver.j2 dest=/etc/kubernetes/apiserver
|
||||
|
5
contrib/ansible/roles/node/tasks/centos.yml
Normal file
5
contrib/ansible/roles/node/tasks/centos.yml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
- name: CentOS | Install kubernetes CentOS style
|
||||
yum: pkg=kubernetes state=latest enablerepo=virt7-testing
|
||||
notify:
|
||||
- restart daemons
|
7
contrib/ansible/roles/node/tasks/generic-install.yml
Normal file
7
contrib/ansible/roles/node/tasks/generic-install.yml
Normal file
@ -0,0 +1,7 @@
|
||||
- name: Install kubernetes
|
||||
action: "{{ ansible_pkg_mgr }}"
|
||||
args:
|
||||
name: kubernetes-node
|
||||
state: latest
|
||||
notify:
|
||||
- restart daemons
|
@ -1,12 +1,9 @@
|
||||
---
|
||||
- name: Install kubernetes
|
||||
action: "{{ ansible_pkg_mgr }}"
|
||||
args:
|
||||
name: kubernetes-node
|
||||
state: latest
|
||||
notify:
|
||||
- restart daemons
|
||||
when: not is_atomic
|
||||
- include: generic-install.yml
|
||||
when: not is_atomic and not ansible_distribution == "CentOS"
|
||||
|
||||
- include: centos.yml
|
||||
when: not is_atomic and ansible_distribution == "CentOS"
|
||||
|
||||
- name: write the config files for kubelet
|
||||
template: src=kubelet.j2 dest=/etc/kubernetes/kubelet
|
||||
|
Loading…
Reference in New Issue
Block a user