From bc85833c9f544e8486e72a2c78472ef40a81ed23 Mon Sep 17 00:00:00 2001 From: abhijit_onap Date: Mon, 25 May 2020 18:10:56 +0530 Subject: [PATCH] Modified the sequence of exection of tasks Added some comments in the various tasks Signed-off-by: abhijit_onap Change-Id: Ie9e269cf7cb9ef381ca69946dbd2e0c89be0f1d5 --- ocd/infra/playbooks/ealt-all.yml | 15 ++++++++++++--- ocd/infra/playbooks/roles/kubeconfig/tasks/install.yml | 9 +-------- ocd/infra/playbooks/roles/mepconfig/tasks/install.yml | 3 +-- ocd/infra/playbooks/roles/mepkubeconfig/tasks/install.yml | 2 +- ocd/infra/playbooks/roles/rabbitmq/tasks/install.yml | 8 ++++---- 5 files changed, 19 insertions(+), 18 deletions(-) diff --git a/ocd/infra/playbooks/ealt-all.yml b/ocd/infra/playbooks/ealt-all.yml index 236de37..3f5a87a 100644 --- a/ocd/infra/playbooks/ealt-all.yml +++ b/ocd/infra/playbooks/ealt-all.yml @@ -32,6 +32,7 @@ - mep roles: + - docker - k3s - hosts: infra-helm @@ -53,7 +54,6 @@ - helm - grafana - kubeconfig - - mepconfig - applcm - hosts: mep @@ -64,14 +64,23 @@ - mep roles: - - docker - - k3s - helm - rabbitmq - prometheus - kubeconfig + - mepkubeconfig - cadvisor +- hosts: mecm + become: yes + tags: + - infra + - infra-mecm + - mecm + + roles: + - mepconfig + - hosts: mepautomate become: yes tags: diff --git a/ocd/infra/playbooks/roles/kubeconfig/tasks/install.yml b/ocd/infra/playbooks/roles/kubeconfig/tasks/install.yml index 149a776..2a0299a 100644 --- a/ocd/infra/playbooks/roles/kubeconfig/tasks/install.yml +++ b/ocd/infra/playbooks/roles/kubeconfig/tasks/install.yml @@ -13,7 +13,7 @@ # limitations under the License. --- -# tasks file for k8s +# tasks file for transferring kubeconfig files - name: debug msg debug: msg: transfering config file to OCD Host @@ -24,10 +24,3 @@ src: /root/.kube/config dest: /root/.kube/config-{{ ansible_host }} flat: yes - -- name: Fetch the file from the edge nodes to ocd-host - run_once: yes - fetch: - src: /root/.kube/config - dest: /root/.kube/kubeconfig/{{ ansible_host }} - flat: yes diff --git a/ocd/infra/playbooks/roles/mepconfig/tasks/install.yml b/ocd/infra/playbooks/roles/mepconfig/tasks/install.yml index 7055f9d..180f787 100644 --- a/ocd/infra/playbooks/roles/mepconfig/tasks/install.yml +++ b/ocd/infra/playbooks/roles/mepconfig/tasks/install.yml @@ -13,13 +13,12 @@ # limitations under the License. --- -# tasks file for k8s +# tasks file for transferring mep k3s cluster config file to mecm k8s - name: debug msg debug: msg: transfering MEP kubeconfig files to MECM Server - name: Transfer kubeconfig files from all MEP Nodes to MEP Server - run_once: yes copy: src: /root/.kube/kubeconfig dest: / diff --git a/ocd/infra/playbooks/roles/mepkubeconfig/tasks/install.yml b/ocd/infra/playbooks/roles/mepkubeconfig/tasks/install.yml index 334a9e4..4602232 100644 --- a/ocd/infra/playbooks/roles/mepkubeconfig/tasks/install.yml +++ b/ocd/infra/playbooks/roles/mepkubeconfig/tasks/install.yml @@ -13,7 +13,7 @@ # limitations under the License. --- -# tasks file for k8s +# tasks file for k3s kube-config file transfer - name: debug msg debug: msg: transfering mep config file to OCD Host diff --git a/ocd/infra/playbooks/roles/rabbitmq/tasks/install.yml b/ocd/infra/playbooks/roles/rabbitmq/tasks/install.yml index 5edeed7..d3113d3 100644 --- a/ocd/infra/playbooks/roles/rabbitmq/tasks/install.yml +++ b/ocd/infra/playbooks/roles/rabbitmq/tasks/install.yml @@ -30,18 +30,18 @@ # yamllint disable rule:line-length when: result.stdout == "" -- name: "INSTALL: copy common folder to host for rabbitmg installation" +- name: "INSTALL: copy common folder to host for rabbitmq installation" copy: src: common dest: /tmp/rabbitmq/ when: result is failed -- name: "INSTALL: Install common for rabbitmg installation" +- name: "INSTALL: Install common for rabbitmq installation" shell: cmd: kubectl apply -f /tmp/rabbitmq/common when: result is failed -- name: "INSTALL: copy statefulset_x86.yaml to host for rabbitmg installation" +- name: "INSTALL: copy statefulset_x86.yaml to host for rabbitmq installation" copy: src: statefulset_x86.yaml dest: /tmp/rabbitmq/ @@ -52,7 +52,7 @@ cmd: kubectl apply -f /tmp/rabbitmq/statefulset_x86.yaml when: result is failed and ansible_architecture == 'x86_64' -- name: "INSTALL: copy statefulset_arm.yaml to host for rabbitmg installation" +- name: "INSTALL: copy statefulset_arm.yaml to host for rabbitmq installation" copy: src: statefulset_arm.yaml dest: /tmp/rabbitmq/ -- 2.16.6