diff --git a/playbooks/haproxy-install.yml b/playbooks/haproxy-install.yml index 183a50d0ed..2a2807de99 100644 --- a/playbooks/haproxy-install.yml +++ b/playbooks/haproxy-install.yml @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -- hosts: haproxy_hosts +- hosts: haproxy vars_files: - "{{ haproxy_keepalived_vars_file | default('vars/configs/keepalived_haproxy.yml')}}" roles: @@ -23,17 +23,17 @@ keepalived_instances: "{{ keepalived_master_instances }}" when: > haproxy_use_keepalived|bool and - inventory_hostname in groups['haproxy_hosts'][0] + inventory_hostname in groups['haproxy'][0] - role: "keepalived" keepalived_sync_groups: "{{ keepalived_backup_sync_groups }}" keepalived_scripts: "{{ keepalived_backup_scripts }}" keepalived_instances: "{{ keepalived_backup_instances }}" when: > haproxy_use_keepalived|bool and - inventory_hostname in groups['haproxy_hosts'][1:] + inventory_hostname in groups['haproxy'][1:] - name: Install haproxy - hosts: haproxy_hosts + hosts: haproxy max_fail_percentage: 20 user: root pre_tasks: diff --git a/playbooks/inventory/group_vars/hosts.yml b/playbooks/inventory/group_vars/hosts.yml index 740d55c0ef..98422039b9 100644 --- a/playbooks/inventory/group_vars/hosts.yml +++ b/playbooks/inventory/group_vars/hosts.yml @@ -269,5 +269,5 @@ tempest_pip_instructions: > ## HAProxy -haproxy_bind_on_non_local: "{% if groups.haproxy_hosts[1] is defined and internal_lb_vip_address != external_lb_vip_address %}True{% else %}False{% endif %}" -haproxy_use_keepalived: "{% if groups.haproxy_hosts|length > 1 %}True{% else %}False{% endif %}" +haproxy_bind_on_non_local: "{% if groups.haproxy[1] is defined and internal_lb_vip_address != external_lb_vip_address %}True{% else %}False{% endif %}" +haproxy_use_keepalived: "{% if groups.haproxy|length > 1 %}True{% else %}False{% endif %}" diff --git a/playbooks/roles/haproxy_server/README.rst b/playbooks/roles/haproxy_server/README.rst index 18d80a00c6..fe68567b50 100644 --- a/playbooks/roles/haproxy_server/README.rst +++ b/playbooks/roles/haproxy_server/README.rst @@ -8,7 +8,7 @@ Role for the installation and setup of haproxy .. code-block:: yaml - name: Install haproxy - hosts: haproxy_hosts + hosts: haproxy user: root roles: - { role: "haproxy_server", tags: [ "haproxy-server" ] }