Browse Source

Merge "Wait for server to be ssh reachable before bootstrap/configuration"

changes/59/326959/4
Jenkins 3 years ago
parent
commit
65ce185c2b
2 changed files with 11 additions and 0 deletions
  1. 1
    0
      site.yml
  2. 10
    0
      wait_for_servers.yml

+ 1
- 0
site.yml View File

@@ -1,6 +1,7 @@
1 1
 ---
2 2
 # file: site.yml
3 3
 - include: generate_infra_dynamic_groups.yml
4
+- include: wait_for_servers.yml
4 5
 - include: common.yml
5 6
 - include: set_hostnames.yml
6 7
 - include: bootstrap_puppetmaster.yml

+ 10
- 0
wait_for_servers.yml View File

@@ -0,0 +1,10 @@
1
+---
2
+# file: wait_for_servers.yml
3
+- hosts: localhost
4
+  connection: local
5
+  gather_facts: no
6
+  user: ubuntu
7
+  become: true
8
+  tasks:
9
+    - wait_for: port=22 host="{{ hostvars[item]['ansible_ssh_host'] }}" search_regex=OpenSSH delay=10
10
+      with_items: "{{ groups['infra'] }}"

Loading…
Cancel
Save