Comment 3 for bug 1960175

Revision history for this message
Dmitriy Rabotyagov (noonedeadpunk) wrote (last edit ):

Hi!

This block of code is responsible for gathering facts: https://opendev.org/openstack/openstack-ansible/src/branch/stable/xena/playbooks/ceph-install.yml#L30-L37

As you might see, it's executed only when `monitor_address_block` variable is defined. Looking at your user_variables, it's set to: monitor_address_block: "{{ cidr_networks.container }}"

From what I can say, you tried to rely on cidr_networks from openstack_user_config, however it's not a valid variable. openstack_user_config used for inventory generation and can't be used that way or referenced directly for variables.

So this result in `monitor_address_block` being undefined as a result.

I think we have an issue in documentation when saying this: https://opendev.org/openstack/openstack-ansible/src/branch/master/etc/openstack_deploy/user_variables.yml.prod-ceph.example#L18-L20

Basically I believe it should be like this:

```
monitor_address_block: "{{ (container_networks['container_address']['address'] ~ '/' ~ container_networks['container_address']['netmask']) | ansible.netcommon.ipaddr('network/prefix') }}"
public_network: "{{ monitor_address_block }}"
cluster_network: "{{ (container_networks['storage_address']['address'] ~ '/' ~ container_networks['storage_address']['netmask']) | ansible.netcommon.ipaddr('network/prefix') }}"
```

Can you kindly check if this solution works for you?