Merge "Fix prechecks for interfaces with dashes"
This commit is contained in:
commit
362cf2bbe3
@ -107,7 +107,7 @@
|
|||||||
|
|
||||||
- name: Checking the kolla_external_vip_interface is active
|
- name: Checking the kolla_external_vip_interface is active
|
||||||
assert:
|
assert:
|
||||||
that: hostvars[inventory_hostname].ansible_facts[kolla_external_vip_interface]['active']
|
that: hostvars[inventory_hostname].ansible_facts[kolla_external_vip_interface | replace('-', '_')]['active']
|
||||||
fail_msg: "Please check the kolla_external_vip_interface settings - interface {{ kolla_external_vip_interface }} is not active"
|
fail_msg: "Please check the kolla_external_vip_interface settings - interface {{ kolla_external_vip_interface }} is not active"
|
||||||
when:
|
when:
|
||||||
- haproxy_enable_external_vip | bool
|
- haproxy_enable_external_vip | bool
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
- name: Checking the api_interface is active
|
- name: Checking the api_interface is active
|
||||||
fail: "msg='Please check the api_interface settings - interface {{ api_interface }} is not active'"
|
fail: "msg='Please check the api_interface settings - interface {{ api_interface }} is not active'"
|
||||||
when: not hostvars[inventory_hostname].ansible_facts[api_interface]['active']
|
when: not hostvars[inventory_hostname].ansible_facts[api_interface | replace('-', '_')]['active']
|
||||||
|
|
||||||
# kolla_address handles relevant address check
|
# kolla_address handles relevant address check
|
||||||
- name: Checking the api_interface ip address configuration
|
- name: Checking the api_interface ip address configuration
|
||||||
|
@ -78,12 +78,6 @@ In Kolla operators should configure following network interfaces:
|
|||||||
with the bare metal cloud hosts in order to provide DHCP leases with
|
with the bare metal cloud hosts in order to provide DHCP leases with
|
||||||
PXE boot options. Defaults to ``network_interface``.
|
PXE boot options. Defaults to ``network_interface``.
|
||||||
|
|
||||||
.. warning::
|
|
||||||
|
|
||||||
Ansible facts does not recognize interface names containing dashes,
|
|
||||||
in example ``br-ex`` or ``bond-0`` cannot be used because ansible will read
|
|
||||||
them as ``br_ex`` and ``bond_0`` respectively.
|
|
||||||
|
|
||||||
.. _address-family-configuration:
|
.. _address-family-configuration:
|
||||||
|
|
||||||
Address family configuration (IPv4/IPv6)
|
Address family configuration (IPv4/IPv6)
|
||||||
|
@ -106,7 +106,7 @@ following:
|
|||||||
static_configs:
|
static_configs:
|
||||||
- targets:
|
- targets:
|
||||||
{% for host in groups['prometheus'] %}
|
{% for host in groups['prometheus'] %}
|
||||||
- '{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ 3456 }}'
|
- '{{ hostvars[host][('ansible_' + hostvars[host]['api_interface'] | replace('-','_'))]['ipv4']['address'] }}:{{ 3456 }}'
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
The jobs, ``custom``, and ``custom_template`` would be appended to the default
|
The jobs, ``custom``, and ``custom_template`` would be appended to the default
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
- name: Bootstrap cephadm
|
- name: Bootstrap cephadm
|
||||||
vars:
|
vars:
|
||||||
mon_ip: "{{ hostvars[inventory_hostname]['ansible_' + api_interface_name].ipv4.address }}"
|
mon_ip: "{{ hostvars[inventory_hostname]['ansible_' + api_interface_name | replace('-','_')].ipv4.address }}"
|
||||||
command:
|
command:
|
||||||
cmd: >
|
cmd: >
|
||||||
cephadm
|
cephadm
|
||||||
@ -80,7 +80,7 @@
|
|||||||
ceph_conf_fixed: |
|
ceph_conf_fixed: |
|
||||||
[global]
|
[global]
|
||||||
fsid = {{ ceph_fsid }}
|
fsid = {{ ceph_fsid }}
|
||||||
mon_host = {% for host in groups['all'] %} {{ hostvars[host]['ansible_' + api_interface_name].ipv4.address }} {% if not loop.last %},{% endif %} {% endfor %}
|
mon_host = {% for host in groups['all'] %} {{ hostvars[host]['ansible_' + api_interface_name | replace('-','_')].ipv4.address }} {% if not loop.last %},{% endif %} {% endfor %}
|
||||||
copy:
|
copy:
|
||||||
content: "{{ ceph_conf_fixed }}"
|
content: "{{ ceph_conf_fixed }}"
|
||||||
dest: "/etc/ceph/ceph.conf.fixed"
|
dest: "/etc/ceph/ceph.conf.fixed"
|
||||||
|
@ -350,7 +350,7 @@
|
|||||||
KOLLA_SWIFT_BASE_IMAGE: "{{ docker_image_prefix }}swift-base:{{ docker_image_tag }}"
|
KOLLA_SWIFT_BASE_IMAGE: "{{ docker_image_prefix }}swift-base:{{ docker_image_tag }}"
|
||||||
# NOTE(yoctozepto): no IPv6 for now
|
# NOTE(yoctozepto): no IPv6 for now
|
||||||
STORAGE_NODES: "{{ groups['all'] | map('extract', hostvars,
|
STORAGE_NODES: "{{ groups['all'] | map('extract', hostvars,
|
||||||
['ansible_'+api_interface_name, 'ipv4', 'address'])
|
['ansible_'+api_interface_name | replace('-','_') , 'ipv4', 'address'])
|
||||||
| join(' ') }}"
|
| join(' ') }}"
|
||||||
CONTAINER_ENGINE: "{{ container_engine }}"
|
CONTAINER_ENGINE: "{{ container_engine }}"
|
||||||
when: scenario == 'swift'
|
when: scenario == 'swift'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user