kolla-ansible/ansible/roles/opendaylight/tasks/precheck.yml
Marcus G K Williams 57496c4147 Add OpenDaylight role
Adds role for OpenDaylight deploy.

Change-Id: I1e697ea4d3f33aab4b0f55863a377b39eda8f609
Co-Authored-By: Mauricio Lima <mauriciolimab@gmail.com>
Co-Authored-By: Jiri Prokes <jirix.x.prokes@intel.com>
Co-Authored-By: Eduardo Gonzalez <dabarren@gmail.com>
Partially-Implements: blueprint opendaylight-support
2017-08-03 07:39:38 -07:00

112 lines
3.9 KiB
YAML

---
- name: Get container facts
kolla_container_facts:
name:
- opendaylight
register: container_facts
- name: Checking free port for opendaylight_clustering
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
port: "{{ opendaylight_clustering_port }}"
connect_timeout: 1
state: stopped
when:
- inventory_hostname in groups['opendaylight']
- container_facts['opendaylight'] is not defined
- name: Checking free port for opendaylight_restconf
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
port: "{{ opendaylight_restconf_port }}"
connect_timeout: 1
state: stopped
when:
- inventory_hostname in groups['opendaylight']
- container_facts['opendaylight'] is not defined
- name: Checking free port for opendaylight_restconf_backup
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
port: "{{ opendaylight_restconf_port_backup }}"
connect_timeout: 1
state: stopped
when:
- inventory_hostname in groups['opendaylight']
- container_facts['opendaylight'] is not defined
- name: Checking free port for opendaylight_karaf_ssh
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
port: "{{ opendaylight_karaf_ssh_port }}"
connect_timeout: 1
state: stopped
when:
- inventory_hostname in groups['opendaylight']
- container_facts['opendaylight'] is not defined
- name: Checking free port for opendaylight_openflow
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
port: "{{ opendaylight_openflow_port }}"
connect_timeout: 1
state: stopped
when:
- inventory_hostname in groups['opendaylight']
- container_facts['opendaylight'] is not defined
- name: Checking free port for opendaylight_ovsdb
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
port: "{{ opendaylight_ovsdb_port }}"
connect_timeout: 1
state: stopped
when:
- inventory_hostname in groups['opendaylight']
- container_facts['opendaylight'] is not defined
- name: Checking free port for opendaylight_jetty_conf_port
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
port: "{{ opendaylight_jetty_conf_port }}"
connect_timeout: 1
state: stopped
when:
- inventory_hostname in groups['opendaylight']
- container_facts['opendaylight'] is not defined
- name: Checking free port for opendaylight_jetty_conf2_port
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
port: "{{ opendaylight_jetty_conf2_port }}"
connect_timeout: 1
state: stopped
when:
- inventory_hostname in groups['opendaylight']
- container_facts['opendaylight'] is not defined
- name: Checking free port for opendaylight_tomcat_port
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
port: "{{ opendaylight_tomcat_port }}"
connect_timeout: 1
state: stopped
when:
- inventory_hostname in groups['opendaylight']
- container_facts['opendaylight'] is not defined
- name: Checking free port for opendaylight_tomcat_redirect_port
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
port: "{{ opendaylight_tomcat_redirect_port }}"
connect_timeout: 1
state: stopped
when:
- inventory_hostname in groups['opendaylight']
- container_facts['opendaylight'] is not defined
- name: Checking available opendaylight nodes in inventory
fail:
msg: "Either 1 or 3 nodes required in inventory for OpenDaylight clustering"
when: groups['opendaylight'] | length == 2