Merge "Clean up references to haproxy_hosts in plays"

This commit is contained in:
Jenkins
2016-02-01 12:49:58 +00:00
committed by Gerrit Code Review
3 changed files with 7 additions and 7 deletions

View File

@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
- hosts: haproxy_hosts - hosts: haproxy
vars_files: vars_files:
- "{{ haproxy_keepalived_vars_file | default('vars/configs/keepalived_haproxy.yml')}}" - "{{ haproxy_keepalived_vars_file | default('vars/configs/keepalived_haproxy.yml')}}"
roles: roles:
@@ -23,17 +23,17 @@
keepalived_instances: "{{ keepalived_master_instances }}" keepalived_instances: "{{ keepalived_master_instances }}"
when: > when: >
haproxy_use_keepalived|bool and haproxy_use_keepalived|bool and
inventory_hostname in groups['haproxy_hosts'][0] inventory_hostname in groups['haproxy'][0]
- role: "keepalived" - role: "keepalived"
keepalived_sync_groups: "{{ keepalived_backup_sync_groups }}" keepalived_sync_groups: "{{ keepalived_backup_sync_groups }}"
keepalived_scripts: "{{ keepalived_backup_scripts }}" keepalived_scripts: "{{ keepalived_backup_scripts }}"
keepalived_instances: "{{ keepalived_backup_instances }}" keepalived_instances: "{{ keepalived_backup_instances }}"
when: > when: >
haproxy_use_keepalived|bool and haproxy_use_keepalived|bool and
inventory_hostname in groups['haproxy_hosts'][1:] inventory_hostname in groups['haproxy'][1:]
- name: Install haproxy - name: Install haproxy
hosts: haproxy_hosts hosts: haproxy
max_fail_percentage: 20 max_fail_percentage: 20
user: root user: root
pre_tasks: pre_tasks:

View File

@@ -269,5 +269,5 @@ tempest_pip_instructions: >
## HAProxy ## 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_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_hosts|length > 1 %}True{% else %}False{% endif %}" haproxy_use_keepalived: "{% if groups.haproxy|length > 1 %}True{% else %}False{% endif %}"

View File

@@ -8,7 +8,7 @@ Role for the installation and setup of haproxy
.. code-block:: yaml .. code-block:: yaml
- name: Install haproxy - name: Install haproxy
hosts: haproxy_hosts hosts: haproxy
user: root user: root
roles: roles:
- { role: "haproxy_server", tags: [ "haproxy-server" ] } - { role: "haproxy_server", tags: [ "haproxy-server" ] }