diff --git a/playbooks/ccp-build.yaml b/playbooks/ccp-build.yaml index c524f5808..18b24fd79 100644 --- a/playbooks/ccp-build.yaml +++ b/playbooks/ccp-build.yaml @@ -36,6 +36,7 @@ args: chdir: /root/ccp run_once: true + when: get_pod.stdout.find('registry') == -1 - name: Create registry svc shell: kubectl create -f registry_svc.yaml @@ -45,11 +46,11 @@ when: get_svc.stdout.find('registry') == -1 - name: Fetch CCP images - shell: "mcp-microservices --config-file=/root/ccp/ccp.conf fetch &> /var/log/ccp-fetch.log" + shell: mcp-microservices --config-file=/root/ccp/ccp.conf fetch run_once: true - name: Build CCP images - shell: "mcp-microservices --config-file=/root/ccp/ccp.conf build &> /var/log/ccp-build.log" + shell: mcp-microservices --config-file=/root/ccp/ccp.conf build run_once: true - hosts: k8s-cluster diff --git a/playbooks/ccp-deploy.yaml b/playbooks/ccp-deploy.yaml index 08d7e805b..9e4b5e95b 100644 --- a/playbooks/ccp-deploy.yaml +++ b/playbooks/ccp-deploy.yaml @@ -20,7 +20,7 @@ run_once: true - name: Deploy CCP - shell: "mcp-microservices --config-file=/root/ccp/ccp.conf deploy &> /var/log/ccp-deploy.log" + shell: mcp-microservices --config-file=/root/ccp/ccp.conf deploy args: chdir: /root/ccp run_once: true