Move keystone precheck into its own role

Change-Id: I5290c923530338682808205cc9c3957178de469c
Partially-implements: blueprint condition-pre-check
This commit is contained in:
caoyuan 2017-01-09 10:39:48 +08:00
parent e6b235e1c7
commit 2b7bde0a7b
3 changed files with 58 additions and 40 deletions

View File

@ -179,6 +179,39 @@
- "{{ 'ironic_api' not in haproxy_stat }}" - "{{ 'ironic_api' not in haproxy_stat }}"
- inventory_hostname in groups['haproxy'] - inventory_hostname in groups['haproxy']
- name: Checking free port for Keystone Admin HAProxy
wait_for:
host: "{{ kolla_internal_vip_address }}"
port: "{{ keystone_admin_port }}"
connect_timeout: 1
state: stopped
when:
- enable_keystone | bool
- "{{ 'keystone_admin' not in haproxy_stat }}"
- inventory_hostname in groups['haproxy']
- name: Checking free port for Keystone Internal HAProxy
wait_for:
host: "{{ kolla_internal_vip_address }}"
port: "{{ keystone_public_port }}"
connect_timeout: 1
state: stopped
when:
- enable_keystone | bool
- "{{ 'keystone_internal' not in haproxy_stat }}"
- inventory_hostname in groups['haproxy']
- name: Checking free port for Keystone Public HAProxy
wait_for:
host: "{{ kolla_external_vip_address }}"
port: "{{ keystone_public_port }}"
connect_timeout: 1
state: stopped
when:
- enable_keystone | bool
- "{{ 'keystone_external' not in haproxy_stat }}"
- inventory_hostname in groups['haproxy']
- name: Checking free port for Kibana HAProxy - name: Checking free port for Kibana HAProxy
wait_for: wait_for:
host: "{{ kolla_internal_vip_address }}" host: "{{ kolla_internal_vip_address }}"

View File

@ -1 +1,26 @@
--- ---
- name: Get container facts
kolla_container_facts:
name:
- keystone
register: container_facts
- name: Checking free port for Keystone Admin
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
port: "{{ keystone_admin_port }}"
connect_timeout: 1
state: stopped
when:
- container_facts['keystone'] is not defined
- inventory_hostname in groups['keystone']
- name: Checking free port for Keystone Public
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
port: "{{ keystone_public_port }}"
connect_timeout: 1
state: stopped
when:
- container_facts['keystone'] is not defined
- inventory_hostname in groups['keystone']

View File

@ -43,46 +43,6 @@
- enable_haproxy | bool - enable_haproxy | bool
- inventory_hostname in groups['haproxy'] - inventory_hostname in groups['haproxy']
- name: Checking free port for Keystone Admin
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
port: "{{ keystone_admin_port }}"
connect_timeout: 1
state: stopped
when:
- enable_keystone | bool
- inventory_hostname in groups['keystone']
- name: Checking free port for Keystone Admin HAProxy
wait_for:
host: "{{ kolla_internal_vip_address }}"
port: "{{ keystone_admin_port }}"
connect_timeout: 1
state: stopped
when:
- enable_keystone | bool
- inventory_hostname in groups['haproxy']
- name: Checking free port for Keystone Public
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
port: "{{ keystone_public_port }}"
connect_timeout: 1
state: stopped
when:
- enable_keystone | bool
- inventory_hostname in groups['keystone']
- name: Checking free port for Keystone Public HAProxy
wait_for:
host: "{{ kolla_internal_vip_address }}"
port: "{{ keystone_public_port }}"
connect_timeout: 1
state: stopped
when:
- enable_keystone | bool
- inventory_hostname in groups['haproxy']
- name: Checking free port for iscsi - name: Checking free port for iscsi
wait_for: wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}" host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"