diff --git a/ansible/roles/hacluster/tasks/bootstrap_service.yml b/ansible/roles/hacluster/tasks/bootstrap_service.yml index 8d503f6740a4bb95c2352b8736e1dafc960527f7..3669143f2336a6c58044d48b8d571aa528c352ae 100644 --- a/ansible/roles/hacluster/tasks/bootstrap_service.yml +++ b/ansible/roles/hacluster/tasks/bootstrap_service.yml @@ -15,12 +15,12 @@ {{ kolla_container_engine }} exec {{ pacemaker_service.container_name }} cibadmin --modify --scope resources -X ' <resources> - <primitive id="{{ ansible_facts.hostname }}" class="ocf" provider="pacemaker" type="remote"> - <instance_attributes id="{{ ansible_facts.hostname }}-instance_attributes"> - <nvpair id="{{ ansible_facts.hostname }}-instance_attributes-server" name="server" value="{{ 'api' | kolla_address }}"/> + <primitive id="{{ ansible_facts.nodename }}" class="ocf" provider="pacemaker" type="remote"> + <instance_attributes id="{{ ansible_facts.nodename }}-instance_attributes"> + <nvpair id="{{ ansible_facts.nodename }}-instance_attributes-server" name="server" value="{{ 'api' | kolla_address }}"/> </instance_attributes> <operations> - <op id="{{ ansible_facts.hostname }}-monitor" name="monitor" interval="60" timeout="30"/> + <op id="{{ ansible_facts.nodename }}-monitor" name="monitor" interval="60" timeout="30"/> </operations> </primitive> </resources> diff --git a/ansible/roles/hacluster/templates/hacluster_corosync.conf.j2 b/ansible/roles/hacluster/templates/hacluster_corosync.conf.j2 index 6547272a274976a16c6dbfc0ebdde06218e3eacd..734eb08a140c3528b4eda732a74ade3f40fc94ad 100644 --- a/ansible/roles/hacluster/templates/hacluster_corosync.conf.j2 +++ b/ansible/roles/hacluster/templates/hacluster_corosync.conf.j2 @@ -13,7 +13,7 @@ nodelist { {% for host in groups['hacluster'] | sort %} node { ring0_addr: {{ 'api' | kolla_address(host) }} - name: {{ hostvars[host].ansible_facts.hostname }} + name: {{ hostvars[host].ansible_facts.nodename }} nodeid: {{ loop.index }} } {% endfor %}