4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 - name: template external dns configmap
18 src: kubedns-external-dns-cm.yml
19 dest: /etc/kubernetes/kubeconfig/kubedns-external-dns-cm.yml
22 - name: template manifest
24 src: kubedns-deployment.yml
25 dest: "{{ caas.manifests_directory }}/kubedns-deployment.yml"
28 - name: template manifest
30 src: kubedns-service.yml
31 dest: "{{ caas.manifests_directory }}/kubedns-service.yml"
34 - name: Load the external dns configmap
36 manifest: "/etc/kubernetes/kubeconfig/kubedns-external-dns-cm.yml"
38 when: ( nodename | search("caas_master1") )
40 - name: Load the kubedns deployment
42 manifest: "{{ caas.manifests_directory }}/kubedns-deployment.yml"
44 when: ( nodename | search("caas_master1") )
46 - name: Load the kubedns service
48 manifest: "{{ caas.manifests_directory }}/kubedns-service.yml"
50 when: ( nodename | search("caas_master1") )
52 - name: wait for container to start
53 shell: "kubectl get po --all-namespaces | grep kube-dns"
55 until: result.stdout.find("2/2") != -1