afdd11b9a2
Useful api_interface_address variable has been define here: https://github.com/openstack/kolla-ansible/blob/master/ansible/group_vars/all.yml#L57 In order to simplify codebase we must use it as much as possible. Change-Id: I18fec19bf69e05a22a4142a9cd1165eccd022455
65 lines
2.0 KiB
YAML
65 lines
2.0 KiB
YAML
---
|
|
- name: Get container facts
|
|
kolla_container_facts:
|
|
name:
|
|
- swift_account_server
|
|
- swift_container_server
|
|
- swift_object_server
|
|
- swift_proxy_server
|
|
register: container_facts
|
|
|
|
- name: Checking free port for Swift Account Server
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + storage_interface]['ipv4']['address'] }}"
|
|
port: "{{ swift_account_server_port }}"
|
|
connect_timeout: 1
|
|
timeout: 1
|
|
state: stopped
|
|
when:
|
|
- container_facts['swift_account_server'] is not defined
|
|
- inventory_hostname in groups['swift-account-server']
|
|
|
|
- name: Checking free port for Swift Container Server
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + storage_interface]['ipv4']['address'] }}"
|
|
port: "{{ swift_container_server_port }}"
|
|
connect_timeout: 1
|
|
timeout: 1
|
|
state: stopped
|
|
when:
|
|
- container_facts['swift_container_server'] is not defined
|
|
- inventory_hostname in groups['swift-container-server']
|
|
|
|
- name: Checking free port for Swift Object Server
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + storage_interface]['ipv4']['address'] }}"
|
|
port: "{{ swift_object_server_port }}"
|
|
connect_timeout: 1
|
|
timeout: 1
|
|
state: stopped
|
|
when:
|
|
- container_facts['swift_object_server'] is not defined
|
|
- inventory_hostname in groups['swift-object-server']
|
|
|
|
- name: Checking free port for Rsync
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + storage_interface]['ipv4']['address'] }}"
|
|
port: "873"
|
|
connect_timeout: 1
|
|
timeout: 1
|
|
state: stopped
|
|
when:
|
|
- container_facts['swift_object_server'] is not defined
|
|
- inventory_hostname in groups['swift-object-server']
|
|
|
|
- name: Checking free port for Swift Proxy Server
|
|
wait_for:
|
|
host: "{{ api_interface_address }}"
|
|
port: "{{ swift_proxy_server_port }}"
|
|
connect_timeout: 1
|
|
timeout: 1
|
|
state: stopped
|
|
when:
|
|
- container_facts['swift_proxy_server'] is not defined
|
|
- inventory_hostname in groups['swift-proxy-server']
|