Hey,

And do you have br-mgmt interface on your bbs-p-swaas-compute1?



On Tue, May 21, 2024, 14:37 Danish Khan <danish52.jmi@gmail.com> wrote:
Dear Team,

My masakari playbook is failing with below error:

TASK [pacemaker_corosync : Creates corosync config] ****************************************************************************************************
Tuesday 21 May 2024  16:24:32 +0530 (0:00:00.369)       0:00:08.576 ***********
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ansible.errors.AnsibleUndefinedVariable: 'dict object' has no attribute 'br_mgmt'
fatal: [bbs-p-swaas-compute1]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'dict object' has no attribute 'br_mgmt'"}

Below is few lines from /etc/ansible/roles/pacemaker_corosync/templates/corosync.conf.j2

{% if inventory_hostname in groups[pacemaker_corosync_group] %}
{%   set _pacemaker_corosync_bind_addr = ansible_facts[pacemaker_corosync_ring_interface | replace('-', '_')]['ipv4']['address'] %}
{% elif  pacemaker_remote_group in groups and inventory_hostname in groups[pacemaker_remote_group] %}
{%   set _pacemaker_corosync_bind_addr = ansible_facts[pacemaker_remote_ring_interface | replace('-', '_')]['ipv4']['address'] %}
{% endif %}

Regards,
Danish Khan