Add variable for container restart timeout
Sometimes containers faill to start in time, this change allows us to control the container start timeout with a single variable. Related: #427
This commit is contained in:
parent
b2d4c0a923
commit
2901062733
@ -189,3 +189,6 @@ logstash_port: 5544
|
||||
|
||||
# Directory where serverspec is installed to on utility container
|
||||
serverspec_install_dir: /opt/serverspec
|
||||
|
||||
# How long to wait for a container after a (re)start
|
||||
container_start_timeout: 180
|
||||
|
@ -34,7 +34,7 @@
|
||||
- name: Wait for container networking
|
||||
wait_for: >
|
||||
port=22
|
||||
timeout=60
|
||||
timeout={{ container_start_timeout }}
|
||||
search_regex=OpenSSH
|
||||
host={{ container_address }}
|
||||
when: restarted_container|changed and is_metal != true
|
||||
|
@ -44,7 +44,7 @@
|
||||
wait_for:
|
||||
port: "22"
|
||||
search_regex: "OpenSSH"
|
||||
timeout: "60"
|
||||
timeout: "{{ container_start_timeout }}"
|
||||
host: "{{ container_address }}"
|
||||
delegate_to: localhost
|
||||
when: inner_extra_changed|changed or local_extra_changed|changed or config_extra_changed|changed
|
||||
|
@ -34,7 +34,7 @@
|
||||
- name: Check Networking After Restart
|
||||
wait_for: >
|
||||
port=22
|
||||
timeout=60
|
||||
timeout={{ container_start_timeout }}
|
||||
search_regex=OpenSSH
|
||||
host={{ hostvars[item]['container_address'] }}
|
||||
with_items: container_groups
|
||||
|
@ -34,7 +34,7 @@
|
||||
- name: Wait for container networking
|
||||
wait_for: >
|
||||
port=22
|
||||
timeout=60
|
||||
timeout={{ container_start_timeout }}
|
||||
search_regex=OpenSSH
|
||||
host={{ container_address }}
|
||||
when: restarted_container|changed and is_metal != true
|
||||
|
Loading…
Reference in New Issue
Block a user