瀏覽代碼

Merge "Fix some issues when executing workload 'dockerswarm'."

changes/74/433874/17
Jenkins 2 年之前
父節點
當前提交
cdc47de271
共有 1 個文件被更改,包括 11 次插入3 次删除
  1. 11
    3
      workloads/ansible/shade/dockerswarm/roles/prov_apply/tasks/main.yml

+ 11
- 3
workloads/ansible/shade/dockerswarm/roles/prov_apply/tasks/main.yml 查看文件

@@ -9,7 +9,7 @@
9 9
 
10 10
 - name: Make certificate configuration file
11 11
   copy:
12
-    src: templates/openssl.cnf
12
+    src: "templates/openssl.cnf"
13 13
     dest: "/tmp/{{ env }}/{{ node_ip }}/keys/"
14 14
 
15 15
 - name: Make service file
@@ -29,11 +29,19 @@
29 29
     dest: "/tmp/{{ env }}/{{ node_ip }}/keys/bootstrap.sh"
30 30
   when: swarmnode.openstack.private_v4 != ""
31 31
 
32
+- name: Wait for ssh connection
33
+  wait_for:
34
+    host: "{{ node_ip  }}"
35
+    port: 22
36
+    delay: 2
37
+    timeout: 300
38
+    search_regex: OpenSSH
39
+
32 40
 - name: Transfer configureation
33
-  shell: scp -r "/tmp/{{ env }}/{{ node_ip }}/keys" "core@{{ node_ip }}:/home/core"
41
+  shell: scp -o "StrictHostKeyChecking=no" -r "/tmp/{{ env }}/{{ node_ip }}/keys" "core@{{ node_ip }}:/home/core"
34 42
 
35 43
 - name: Transfer certificate file over to the nodes
36
-  shell: scp -r "/tmp/{{ env }}/keys" "core@{{ node_ip }}:/home/core"
44
+  shell: scp -o "StrictHostKeyChecking=no" -r "/tmp/{{ env }}/keys" "core@{{ node_ip }}:/home/core"
37 45
 
38 46
 - name: Start services
39 47
   shell: ssh "core@{{ node_ip }}" "sh keys/bootstrap.sh"

Loading…
取消
儲存