Commit fb9d1653 authored by root's avatar root
Browse files

fix build error on CentOS 7 (2009)

parent 7d922645
---
# tasks file for docker-host
- name: Install required packages
yum:
name: ["yum-utils","device-mapper-persistent-data","lvm2","epel-release","rsync",]
name: ["yum-utils","device-mapper-persistent-data","lvm2","epel-release","rsync"]
state: latest
when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux'
- name: Add Docker repository
get_url:
url: https://download.docker.com/linux/centos/docker-ce.repo
dest: /etc/yum.repos.d/docker-ce.repo
mode: 0644
when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux'
- name: Install required packages
yum:
name: ["docker-ce","docker-ce-cli","containerd.io","python-pip","unzip","firewalld"]
name: ["docker-ce","docker-ce-cli","containerd.io","python-pip","unzip","firewalld","python-docker-py"]
state: latest
validate_certs: no
when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux'
- name: Install pip packages
pip:
name: ["docker-py>1.10.0"," pexpect>=3.3"]
name: ["pexpect==3.3"]
- name: Set sysctl parameters
sysctl:
name: "{{item.key}}"
......@@ -33,19 +28,16 @@
sysctl_set: yes
with_items:
- "{{sysctlconfig}}"
- name: Configure fw
ansible.posix.firewalld:
rich_rule: "rule family=ipv4 source address={{ soctools_network }} accept"
permanent: yes
state: enabled
- name: Reload firewalld
systemd:
state: restarted
daemon_reload: yes
name: firewalld
- name: Start Docker service
systemd:
name: docker
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment