c08460c707
The gate is now using the last ansible-lint version (4.0.1) which have new ids/tags and new rules. The old tags (ANSIBLE*) should remains backwardly compatible but this patch is using the new ones. This patch fixes all the lint issues. Change-Id: Ic151f3e969b8e3729394fd477bb8341d1cb75fd7 Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
30 lines
1009 B
YAML
30 lines
1009 B
YAML
- name: gather docker facts
|
|
docker_facts:
|
|
container_filter: status=running
|
|
become: yes
|
|
|
|
- name: compare running containers to list
|
|
set_fact:
|
|
container_difference: "{{ running_containers | difference(docker.containers_filtered | map(attribute='name') | list) }}"
|
|
|
|
- block:
|
|
- name: check appropriate running containers against list - if FAILED, check next task
|
|
assert:
|
|
that: "{{ container_difference | length == 0 }}"
|
|
rescue:
|
|
- name: following containers found to be NOT running
|
|
debug:
|
|
var: container_difference
|
|
|
|
- name: check appropriate ports are listening
|
|
wait_for:
|
|
host: "{{ listening_ip }}"
|
|
port: "{{ item.port | default(item) }}"
|
|
search_regex: "{{ item.search_regex | default(omit) }}"
|
|
state: started # Port should be open
|
|
delay: 0 # No wait before first check (sec)
|
|
timeout: 3 # Stop checking after timeout (sec)
|
|
ignore_errors: yes
|
|
loop: "{{ open_ports }}"
|
|
when: ctlplane_ip is defined
|