mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-26 07:26:09 -03:30
use docker repository to install on CentOS
This commit is contained in:
@@ -38,12 +38,12 @@
|
||||
with_items: "{{ docker_repo_info.repos }}"
|
||||
when: docker_repo_info.repos|length > 0
|
||||
|
||||
- name: Configure docker repository on RedHat
|
||||
- name: Configure docker repository on RedHat/CentOS
|
||||
copy:
|
||||
src: "rh_docker.repo"
|
||||
dest: "/etc/yum.repos.d/docker.repo"
|
||||
when: ansible_distribution == "RedHat" and
|
||||
ansible_distribution_major_version > 7
|
||||
when: ansible_distribution in ["CentOS","RedHat"] and
|
||||
ansible_distribution_major_version >= 7
|
||||
|
||||
- name: ensure docker packages are installed
|
||||
action: "{{ docker_package_info.pkg_mgr }}"
|
||||
@@ -53,15 +53,6 @@
|
||||
with_items: "{{ docker_package_info.pkgs }}"
|
||||
when: docker_package_info.pkgs|length > 0
|
||||
|
||||
- name: Centos needs xfs storage type for devicemapper if used
|
||||
lineinfile:
|
||||
dest: /etc/sysconfig/docker-storage
|
||||
line: "DOCKER_STORAGE_OPTIONS='--storage-opt dm.fs=xfs'"
|
||||
regexp: '^DOCKER_STORAGE_OPTIONS=.*$'
|
||||
state: present
|
||||
backup: yes
|
||||
when: ansible_distribution == "CentOS"
|
||||
|
||||
- meta: flush_handlers
|
||||
|
||||
- name: ensure docker service is started and enabled
|
||||
|
||||
Reference in New Issue
Block a user