b123bf6621
Many tasks that use Docker have become specified already, but not all. This change ensures all tasks that use the following modules have become: * kolla_docker * kolla_ceph_keyring * kolla_toolbox * kolla_container_facts It also adds become for 'command' tasks that use docker CLI. Change-Id: I4a5ebcedaccb9261dbc958ec67e8077d7980e496
113 lines
3.9 KiB
YAML
113 lines
3.9 KiB
YAML
---
|
|
- name: Get container facts
|
|
become: true
|
|
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
|