Added centOS commands 21/3521/1
authorArvind Patel <arvind.patel@huawei.com>
Wed, 27 May 2020 19:00:41 +0000 (00:30 +0530)
committerArvind Patel <arvind.patel@huawei.com>
Wed, 27 May 2020 19:01:34 +0000 (00:31 +0530)
Change-Id: Icc7f4e215407424081dd2fbfac2bf64936cb1592

ocd/infra/playbooks/roles/docker/tasks/install.yml

index 649bac9..c72fe26 100644 (file)
   command: apt-get install -y docker-ce docker-ce-cli containerd.io
   ignore_errors: yes
   when: result is failed and ansible_architecture == 'aarch64'
+
+- debug:
+    msg: "CentOS commands start"
+
+- name: "INSTALL:Installing docker "
+  command: yum install -y yum-utils
+  when: ansible_facts['distribution'] == "CentOS" and result is failed
+  ignore_errors: yes
+  no_log: true
+
+- name: "INSTALL: Add repo"
+  command: yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
+  when: ansible_facts['distribution'] == "CentOS" and result is failed
+  #ignore_error: yes
+  no_log: true
+
+- name: "INSTALL: install containerd.io"
+  command: yum -y install docker-ce-19.03.8 docker-ce-cli-19.03.8 containerd.io
+  when: ansible_facts['distribution'] == "CentOS" and result is failed
+  ignore_errors: yes
+  no_log: true
+
+- name: "Start Docker:"
+  command: systemctl start docker
+  when: ansible_facts['distribution'] == "CentOS" and result is failed
+  ignore_errors: yes
+  #no_log: true
+
+- name: "Start Docker: enable"
+  command: systemctl enable docker
+  when: ansible_facts['distribution'] == "CentOS" and result is failed
+  ignore_errors: yes