Clean up references to haproxy_hosts in plays
Instead, reference the 'haproxy' service group. This allows the plays to be container agnostic and move the haproxy deployment closer to being container-compatible. Change-Id: Ibfe0e3a0cb742c8d5c3943922da0a30a56016266
This commit is contained in:
parent
7e66566995
commit
24f562ad46
@ -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:
|
||||
|
@ -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 %}"
|
||||
|
@ -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" ] }
|
||||
|
Loading…
x
Reference in New Issue
Block a user