X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=ocd%2Finfra%2Fplaybooks%2Froles%2Fdocker%2Ftasks%2Finstall.yml;h=119f67580927feec8ba3a8fc34971e6f2b77b29e;hb=refs%2Fchanges%2F08%2F4008%2F10;hp=e411e1640f8522a17dae19cc9c484d11f355a566;hpb=6ce510fccce9b5481e88d10c3ffa73ed0284b517;p=ealt-edge.git diff --git a/ocd/infra/playbooks/roles/docker/tasks/install.yml b/ocd/infra/playbooks/roles/docker/tasks/install.yml index e411e16..119f675 100644 --- a/ocd/infra/playbooks/roles/docker/tasks/install.yml +++ b/ocd/infra/playbooks/roles/docker/tasks/install.yml @@ -29,24 +29,24 @@ # yamllint disable rule:line-length when: result.stdout == "" -- name: "Installing docker update" +- name: "INSTALL: Installing docker update" command: apt-get update -y ignore_errors: yes failed_when: false no_log: True -- name: "Installing docker upgrade" +- name: "INSTALL: Installing docker upgrade" # yamllint disable rule:line-length command: apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common # yamllint disable rule:line-length ignore_errors: yes when: result is failed and ansible_architecture == 'aarch64' -- name: Add repository +- name: "INSTALL: Add repository" shell: curl -sL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - when: result is failed and ansible_architecture == 'aarch64' -- name: "CA-Certificates" +- name: "INSTALL: CA-Certificates" # yamllint disable rule:line-length shell: sudo add-apt-repository "deb [arch=arm64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" # yamllint disable rule:line-length @@ -55,14 +55,78 @@ no_log: True when: result is failed and ansible_architecture == 'aarch64' -- name: "Update....." +- name: "INSTALL: Update....." command: apt-get update -y ignore_errors: yes failed_when: false no_log: True when: result is failed and ansible_architecture == 'aarch64' -- name: "Installed docker" +- name: "INSTALL: Installed docker" command: apt-get install -y docker-ce docker-ce-cli containerd.io ignore_errors: yes when: result is failed and ansible_architecture == 'aarch64' + +- name: "INSTALL: Installing docker upgrade" +# yamllint disable rule:line-length + command: apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common +# yamllint disable rule:line-length + ignore_errors: yes + when: result is failed and ansible_architecture == 'x86_64' + +- name: "INSTALL: Add repository" + shell: curl -sL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - + when: result is failed and ansible_architecture == 'x86_64' + +- name: "INSTALL: CA-Certificates" +# yamllint disable rule:line-length + shell: sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" +# yamllint disable rule:line-length + ignore_errors: yes + failed_when: false + no_log: True + when: result is failed and ansible_architecture == 'x86_64' + +- name: "INSTALL: Update....." + command: apt-get update -y + ignore_errors: yes + failed_when: false + no_log: True + when: result is failed and ansible_architecture == 'x86_64' + +- name: "INSTALL: Installed docker" + command: apt-get install -y docker-ce docker-ce-cli containerd.io + ignore_errors: yes + when: result is failed and ansible_architecture == 'x86_64' + +- 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